I am trying to set up an IP logging PHP code:
This is a code i have stumbled accross.
<?
$log_file = “ip.txt”;
$hourdiff = “-8”;
$timeadjust = ($hourdiff * 60
$date = date(“l, d F Y t h:i a”,time() + $timeadjust);
$ie = getenv(‘HTTP_USER_AGENT’);
$ip = getenv(‘REMOTE_ADDR’);
$ia = $_SERVER[“HTTP_REFERER”];
$fp = fopen(“$log_file”, “a”);
fputs($fp, “$iprn”);
flock($fp, 3);
fwrite($fp,$date);
fwrite($fp,”t”);
fwrite($fp,$ip);
fwrite($fp,”tt”);
fwrite($fp,$ie);
fwrite($fp,”t”);
fwrite($fp,$ia);
fwrite($fp,”n”);
fclose($fp);
PRINT(“Your Ip was logged $ip <br>”);
?>
the problem is, if you look at
[url]http://www.giggledesign.com/home/iplog.php
you will see that it wont work. i don’t know what to do.
can anyone help please?