PHP/Text Hit Counter
Store count in Text file instead of database. The count is increased everytime the page is refresh.
PHP files needed:
| count.php | Open hit.txt to fetch count and insert new count after increase. |
| hit.txt | Store the count. *important: this file must be chmod 777 for it to work. |
Installation
- Create an empty text file 'hit.txt'. CHMOD 777 for the file 'hit.txt'
- Store the 'count.php' in the same dir as 'hit.txt'.
- In the file you want the hit counter appear, insert the line in php tag: include("dir/count.php');
- Sample index.php is included in the download package below
Download
PHP/Text Hitcounter

