Re: Creating a simple hitcounter for PHP web pages. (saves to files)
- From: Michael Fesser <netizen@xxxxxx>
- Date: Sat, 31 May 2008 00:57:35 +0200
..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
.
- Follow-Ups:
- Re: Creating a simple hitcounter for PHP web pages. (saves to files)
- From: tony19760619
- Re: Creating a simple hitcounter for PHP web pages. (saves to files)
- References:
- Creating a simple hitcounter for PHP web pages. (saves to files)
- From: tony19760619
- Re: Creating a simple hitcounter for PHP web pages. (saves to files)
- From: tony19760619
- Creating a simple hitcounter for PHP web pages. (saves to files)
- Prev by Date: Re: using fopen() in write mode is failing
- Next by Date: Re: how to invoke ReflectionMethod and pass variable by reference as argument?
- Previous by thread: Re: Creating a simple hitcounter for PHP web pages. (saves to files)
- Next by thread: Re: Creating a simple hitcounter for PHP web pages. (saves to files)
- Index(es):