IP Logger in PHP

by Manigandan 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);
?>

Tagged in:

913
like
0
dislike
0
mail
flag

You must LOGIN to add comments