$date = date("m-d-Y - g:i:s A");
$host=gethostbyaddr($REMOTE_ADDR);
$addr=$REMOTE_ADDR;
$page=$HTTP_REFERER;
?>
/*write visitor info to file*/
$dir="./countz.html";?>
$fp = fopen($dir, "a");fwrite($fp,"
");fclose($fp);?>
$fp = fopen($dir, "a");fwrite($fp,$date);fclose($fp);?>
$fp = fopen($dir, "a");fwrite($fp," | ");fclose($fp);?>
$fp = fopen($dir, "a");fwrite($fp,$addr);fclose($fp);?>
$fp = fopen($dir, "a");fwrite($fp," | ");fclose($fp);?>
$fp = fopen($dir, "a");fwrite($fp,$host);fclose($fp);?>
$fp = fopen($dir, "a");fwrite($fp," | ");fclose($fp);?>
$fp = fopen($dir, "a");fwrite($fp,$page);fclose($fp);?>
$fp = fopen($dir, "a");fwrite($fp," |
");fclose($fp);?>
$fp = fopen($dir, "a");fwrite($fp,"\n");fclose($fp);?>
/*count number of hits*/
$lines = file ("./countz.html");?>
$num_lines = count ($lines)-1;?>