IP Logger in PHP
by Manigandan[ Edit ] 2011-06-17 18:28:22
$logfile= '/full_path_to/log.html';
$IP = $_SERVER['REMOTE_ADDR'];
$logdetails= date("F j, Y, g:i a") . ': ' . '
'.$_SERVER['REMOTE_ADDR'].'';
$fp = fopen($logfile, "a");
fwrite($fp, $logdetails);
fwrite($fp, "
");
fclose($fp);
?>