|
|
|
It is the simple counter with registration of visitings and
users agent - Internet Explorer(green),Netscape(blue) and Other(Red).
INSTALL:
1. Create the necessary tables. See below.
2. Create in MySql user counter,pass counter with access to these tables.
3. Save code in file count.php3
4. Add string <img src="http://your.host/count.php3"> where you want to put
the counter.
Note 1
array $exception contains ip-addresses from which visiting do not count.
Note 2
If you have one page with different names like
Id URL
4 http://www.some.com/
12 http://www.some.com/index.html
Choose Id from the table counter and change them in the table eq.
WAS: Id Id1
4 4
12 12
make: update eq set Id=4 where Id1=12;
Became:Id Id1
4 4
4 12
==== CREATE TABLE ========
Make this command in mysql
create database count;
use count;
create table agents (
Id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
agent VARCHAR(255) NOT NULL,
type ENUM("IE","Netscape","Other"),
counts INT NOT NULL DEFAULT 0,
last TIMESTAMP,
open TIMESTAMP,
KEY (Id),
INDEX (agent(64)),
UNIQUE (agent)
);
create table counters (
Id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
URL VARCHAR(255) NOT NULL,
counts INT UNSIGNED NOT NULL DEFAULT 0,
IE INT UNSIGNED NOT NULL DEFAULT 0,
Netscape INT UNSIGNED NOT NULL DEFAULT 0,
Other INT UNSIGNED NOT NULL DEFAULT 0,
last TIMESTAMP,
open TIMESTAMP,
KEY (Id),
INDEX (URL(64)),
UNIQUE (URL)
);
create table eq (
id SMALLINT,
id1 SMALLINT
);
========CODE ============
See Attach File
|
|
| Functions for loading images into a MySQL database and displaying them. Categories : Graphics, HTML and PHP, MySQL, PHP, Databases | | | Creating thumbnails from MySQL Blobs online Categories : PHP, MySQL, Graphics, HTML and PHP, Databases | | | Simple pipe delimited file export program that downloads to a local machine Categories : PHP, Filesystem, Databases, MySQL, HTTP | | | Identify and log search engine access (spiders, robots, etc.) to a page. Categories : HTTP, Environment Variables, PHP, MySQL, Databases | | | This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server. Categories : Databases, MySQL, Complete Programs, PHP, Databases | | | Loading Images to/from MySQL Categories : Databases, MySQL, PHP, Graphics | | | bookmarker - PHP, PHPLIB, MySQL WWW based bookmark manager Categories : MySQL, PHP, MySQL, Complete Programs, Databases | | | A simple script to count and report hits and the last
modification time of an HTML page. Requires MySQL support
(other DBs should work too, except possibly mSQL). Categories : HTTP, MySQL, PHP, Databases | | | Accepts a database & hostname from a user and then HTTP username and password. Uses this to connect to a MySQL database. Produces a form based on the tables it finds there to allow the user to do SELECTs, INSERTs, and DELETEs. Categories : Databases, PHP, MySQL, Complete Programs | | | Cut your MySQL Connections to 1 line of code Categories : PHP, Beginner Guides, Databases, MySQL | | | phpAds, a complete banner and ad management system with detailled tracking and stats. Categories : MySQL, Complete Programs, Ecommerce, PHP, Databases | | | Point and Click Interface ala MS Access for creating SQL statements. Categories : MySQL, Complete Programs, General SQL, PHP, Databases | | | Displaying records of database in more than one page (paging) Categories : Databases, MySQL, PHP | | | html split bar used to split in multiple pages a database result Categories : HTML and PHP, Databases, MySQL, PHP | | | Tropicalm Genetree Family (MySQL based family tree) Categories : PHP, Interfaces, Databases, MySQL, Complete Programs | |
|
|
|