Forum Moderators: DixonJones
Anybody knows a php script that records the following in a logfile?
ip referring url target url date
<?php $uri = "http://www.mysite.com" . $_SERVER['REQUEST_URI']; $ip = $_SERVER['REMOTE_ADDR']; $ref = $_SERVER['HTTP_REFERER']; $dtime = date('r'); $unixtime=time();
$line = "$unixtime;$dtime;$ip;$uri;$ref";
$f = fopen("log.log", "a");
@fwrite($f, $line . "\n"); @fclose($f); ?>