here my code to record visitors ip logs on page
//Set the date so we can store it in the text file.
$tdate = date("dS F Y h:i:s A");
//Check if there is a referer
if (!$HTTP_REFERER) { $HTTP_REFERER = "(NONE)"; }
//Store it in the counter.txt file ! DONT FORGET TO SET COUNTER.TXT CHMOD 777 !
$fp = fopen("counter.txt", "a");
$line = "IP Address: $REMOTE_ADDR - Date: $tdate - Referer: $HTTP_REFERER - Browser: $HTTP_USER_AGENT\n";
fwrite($fp, $line);
fclose($fp);
echo "Your IP is $REMOTE_ADDR
";
echo "the time is $tdate
";
echo "you are using $HTTP_REFERER";[/b]
//Set the date so we can store it in the text file.
$tdate = date("dS F Y h:i:s A");
//Check if there is a referer
if (!$HTTP_REFERER) { $HTTP_REFERER = "(NONE)"; }
//Store it in the counter.txt file ! DONT FORGET TO SET COUNTER.TXT CHMOD 777 !
$fp = fopen("counter.txt", "a");
$line = "IP Address: $REMOTE_ADDR - Date: $tdate - Referer: $HTTP_REFERER - Browser: $HTTP_USER_AGENT\n";
fwrite($fp, $line);
fclose($fp);
echo "Your IP is $REMOTE_ADDR
";
echo "the time is $tdate
";
echo "you are using $HTTP_REFERER";[/b]
that way you know who is who

Comment