Re: Creating a simple hitcounter for PHP web pages. (saves to files)



..oO(tony19760619@xxxxxxxxx)

//------------------------------
//-- Do list details stuff
//------------------------------
$ip=$_SERVER[REMOTE_ADDR];
$dnsname = gethostbyaddr($ip);
$referer=$_SERVER[HTTP_REFERER];
$page=$_SERVER[PHP_SELF];
$now = date( "Y/m/d H:i:s", time() );
@fputs($fp_list_file , "$now,$hits,$page,$ip,$dnsname,$referer\r\n");
@fclose($fp_list_file);
?>

This code will still throw at least three notices. You should fix your
error_reporting, as already suggested in alt.php.

Micha
.