I got the below...
<?
// Full sys path to count.txt
$counter_file = "http://www.site.com/count.txt";
// Puts the file lines into $counter_file_line array
$counter_file_line = file($counter_file);
// adds one to the number in the [0] array or the very first line
$counter_file_line[0]++;
// opends the file and then writes the new number and then closes it
$cf = fopen($counter_file, "w");
fputs($cf, "$counter_file_line[0]");
fclose($cf);
// prints out the full count
echo "$counter_file_line[0]";
?>
checked it all out and made sure only needed to change the location, anyways, it doesn't work, just displays 1, how ever many time you refresh, (yes, I've tried getting others to visit as well).
The count.txt file is chmoded to 664 I think, its got group write permissions anyways and as it echos the "1" at the end, it seems to be partly working, just not counting!
Thanks for any help.