PHP Classes

phpHitCounter: Log and display the number of site user visits

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (10)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,337 All time: 2,895 This week: 660Up
Version License Categories
hc 1.0GNU Lesser Genera...Statistics, User Management


phpHitCounter is a class that can that can logs and display the number of users that visited a site.

The count of hits is stored in one file. The log of the visitors IP address and access time can be optionally recorded in another file.

The class can display an hit count either using images or text digits.

Feature List:

- Simple Hit Counter with just three lines of code
- Two modes of operation: image or text based
- Logging visitor IP address and access time to be able to count the number of unique visitors
- Theme support for displaying image based hit counters

Picture of Vedanta Barooah
Name: Vedanta Barooah <contact>
Classes: 11 packages by
Country: United States United States
Age: 44
All time rank: 497 in United States United States
Week rank: 48 Up6 in United States United States Up
Innovation award
Innovation award
Nominee: 2x

Winner: 2x


+---------------------------------------------+ Getting Help: The sample scripts in the examples/ directory may be a good starting point to learn the class usage. The class is phpdoc compatible so you can generate the documentation if required. If you dont know to do that drop me a mail and I will send you a pdf of the same ;) Sample Scripts: +---------------------------------------------+ These are under the examples/ directory of the download: sample1.php: simple text based hitcounter sample2.php: simple text based hitcounter but looks for unique visitors sample3.php: simple image based hitcounter sample4.php: simple image based hitcounter, but uses the lcd theme sample5.php: image based hitcounter, but uses the lcd theme and look for unique visitors +---------------------------------------------+ Image based hit counters need images that are not a part of this download. The image path expected by the class is as : ./images/theme_name/0.gif ./images/theme_name/1.gif ./images/theme_name/2.gif ./images/theme_name/3.gif ./images/theme_name/4.gif ./images/theme_name/5.gif ./images/theme_name/6.gif ./images/theme_name/7.gif ./images/theme_name/8.gif ./images/theme_name/9.gif Hit counter images can be downloaded from (this site is not mine!) If you need some sample start up images/themes ... please drop me a mail +---------------------------------------------+ Vedanta Barooah - vedanta dot barooah at gmail dot com

  • screenshot.gif
  Files folder image Files  
File Role Description
Files folder imagedocs (2 files)
Files folder imageexamples (5 files)
Plain text file comments.txt Data comments, changelog
Plain text file hitcounter.class.php Class Main Class Source
Plain text file README Doc. Read Me First

  Files folder image Files  /  docs  
File Role Description
  HTML file manual.html Doc. Class Reference
  Plain text file stylesheet.css Data Style Data

  Files folder image Files  /  examples  
File Role Description
  Plain text file sample1.php Example Example 1
  Plain text file sample2.php Example Example 2
  Plain text file sample3.php Example Example 3
  Plain text file sample4.php Example Example 4
  Plain text file sample5.php Example Example 5

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,895
This week:660Up