To noting visitor by using Address IP. As usual for first step which we make is to make name database at Mysql which we later will us as storage media. Table Scrip at database shall be as follows.
CREATE TABLE `ipcounter` (
`id` int(21) NOT NULL auto_increment,
`ip` varchar(250) default NULL,
`hits` int(250) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM ;
After success making IP counter, step hereinafter is to make connection database used to connect web with database, so that application which we make can update finely. Following is PHP connection scrip with Mysql. (keep by the name of config.php)
$hostname = “hostname”;
$username = “username”;
$password = “password”;
$database = “name database”;
$connect = mysql_connect ($hostname, $username, $password) or die
(“connection database wrong”);
mysql_select_db ($database, $connect) or die (“database not found”);
?>
After making connection scrip with database of Mysql do step here in after is making index page. This page is we us as appearance of IP and visit from the visitor. For example your IP is 127.0.01 have visited this site web counted 17 times. Following scrip used to present data of IP and visit amount. (keep by the name of index.php)
To noting visitor by using Address IP. As usual for first step which we make is to make name database at Mysql which we later will us as storage media. Table Scrip at database shall be as follows.
CREATE TABLE `ipcounter` (
`id` int(21) NOT NULL auto_increment,
`ip` varchar(250) default NULL,
`hits` int(250) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM ;
After success making IP counter, step hereinafter is to make connection database used to connect web with database, so that application which we make can update finely. Following is PHP connection scrip with Mysql. (keep by the name of config.php)
$hostname = “hostname”;
$username = “username”;
$password = “password”;
$database = “name database”;
$connect = mysql_connect ($hostname, $username, $password) or die
(“connection database wrong”);
mysql_select_db ($database, $connect) or die (“database not found”);
?>
After making connection scrip with database of Mysql do step here in after is making index page. This page is we us as appearance of IP and visit from the visitor. For example your IP is 127.0.01 have visited this site web counted 17 times. Following scrip used to present data of IP and visit amount. (keep by the name of index.php)