The PHP Counter that I recommend can only count the number of times the page has been accessed. It cannot count the number of unique visitors. The PHP hit counter simply updates a text file, which keeps track of the number of times the page is accessed. The PHP Script read the current the file, then adds one to the number, writes the number to the file and close the file. The script is then embedded into the html on the web page so that it is executed each time the page is accessed.
The hit counter script looks like this:
<?php
$filename = "hits.txt";
$count= file($filename);
$count[0]++;
$file = fopen ($filename, "w") or die ("Cannot find $filename");
fputs($file, "$count[0]");
fclose($file);
echo $count[0];
?>


