Tuesday, August 3, 2010

Unique Hitcounter

Unique Hitcounter

PHP Code:

  $ip
=$_SERVER[REMOTE_ADDR];

  
$file=file_get_contents("ipLog.txt");

  if(
substr_count($file$ip)==0) {

  
$file.="\n" $ip;

  }

  
file_put_contents("ipLog.txt"$file);

  
$total=substr_count($file"\n");
echo 
"$total";
?>

No comments:

Post a Comment