//start your PHP!
//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);
//Show what the user needs to know!
echo "IP Address: $REMOTE_ADDR
";
echo "Referer: $HTTP_REFERER
";
echo "Browser: $HTTP_USER_AGENT";
?>