Visitor Counter
#1 09-02-2010 
I know, there are LOADS of free counters out there, all full of statistics and things. But I want to make my OWN. It might be small and rubbish, but it will be my own little .php project.


I have made a simple .php counter, using a flat file and the update contents function.

However, I now need to work out how to get the blasted thing to show on the forum.......

Once I've done that - HTML code time.
The site don't jive? PRESS F5 Flower

#2 13-02-2010 
So here is the code for the visitor counter

// here we get the contents of a flat file and indicate to increment the contents by 1
$hits = file_get_contents("hits.txt");
$hits = $hits + 1;

//here we open the file using a handle fopen, determine the file and say what to do, in this case write
$handle = fopen("hits.txt", "w");
fwrite($handle, $hits);

print $hits; visitors to Leefish
Geez, its busy busy. I want to get this working but we have visitors this weekend....
The site don't jive? PRESS F5 Flower


Sorry, that is a members only option