All different IPs once? Or each time a page is requested, regardless of the existing IPs in the database? Be more specific on what you're trying to accomplish.
When a page is requested the ip should be added to the database and the time of request. Again if a user come from the same ip , it will be recorded with different time
<?php // Leave this part out if a connection has been established already: $con = mysql_connect('localhost', 'username', 'password') OR die(mysql_error()); mysql_select_db('database-name', $con) OR die(mysql_error()); // This is necessary: mysql_query("INSERT INTO table_name (ipaddress, dateline) VALUES ('". $_SERVER['REMOTE_ADDR'] ."', ". time() .")") OR die(mysql_error()); ?> PHP: Create a table with two columns: "ipaddress" - VARCHAR (15) "dateline" - INT (10)