Good day to everyone from a new member - does anyone know what's happened to devnetwork.net today? Oops... probably a rude word here?
I wonder if anyone can help me out here - being a relative newcomer to coding, myself - so that I can make some headway with my little tracking script.
I've written a nice hit counter script that works well:
<?
//A small but effective script to echo the number of hits contained in a flatfile database,
//to be manipulated as necessary.
$fh = fopen("hits.txt","r+");
$current = file_get_contents("hits.txt");
echo $current;
$current++;
fwrite($fh,$current);
fclose($fh);
?>
This works perfectly as a hit counter, and I want to develop it a little so that it displays hits for the current and previous months (not total hits)- without the use of an SQL database. This way, I can echo the contents of the text file in a tracking suite instead of on the web page being tracked, capiche?
Anyone have any ideas? All help gratefully received!
Thanks in advance,
Matt Cooper
|