Basic Hit Counter

Added: 09 September, 2006
Downloads: 1666
Required: php
Ratting: 3.4

This hit counter can count the hits for your homepage. It is a php script and it uses a text file to write down the number of hits. The php script makes a java script output to show the hits in your webpage.



Installation:

  1. Upload the counter.php and count.txt file to your server.
  2. Change the CHMOD of count.txt file to 777

Showing hits in home page
Add the script below in you homepage where you want to show your hit counts.

<SCRIPT LANGUAGE="Javascript" SRC="counter.php"><!--//--></SCRIPT>

Change the url of counter.php from the above line to your one.

Formatting hit counter text
Of course you can show the hit counter the way you like. Just insert the code inside any html tags. Such as...

<p align="Center"><b>This page has been visited total <font color="#FF0000"><SCRIPT LANGUAGE="Javascript" SRC="counter.php"><!--//--></SCRIPT></font> since 1 January 2006</b></p>

This would show this...

This page has been visited total 420 (;P) times since 1 January 2006