Free and Open Source PHP Counter
script show you a image based, text based or real-time counter to help you check the status of your site.
PHP counter is a web-based counter written in PHP, It is a multi-counter tracking system that logs visitor data and statistics in real time.
A hit counter is a PHP counter script that counts the number of times and a web page has been accessed. This allows both the owener of the page and visitors to know how popular the page is . A simple hit counter can be created with PHP in just nine lines of code.
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:
$filename = "hits.txt";
$file = fopen ($filename, "w") or die ("Cannot find $filename");