Project 33

Unique Web Page Hit Counter

The Neurillion Free Web Page Hit Counters are free items from Neurillion released under a Creative Commons Attribution 3.0 License. These counters were written by the author for the author to test various methods of recording and displaying a page hit counter and come with absolutely no guarantee or warranty. Please refer to the FAQ and help sections for more information and a proper disclaimer.


The "unique" counter is actually just an extra component that could be combined with any of the other counters, but v1 of the counter here is a standalone "bug" type counter. The example on this page uses very simple code similar to bug and has a single <img> call and returns a 1x1 pixel transparent image.

So, what does it mean to be "unique" when counting a hit? This counter (v1) uses a combination of IP address and time period, although future versions may use a cookie, or other technique. The "period" is an integer value for number of seconds between hits. The period defaults to a maximum value so a "hit" is only counted once (for that IP [or ookie]), so the period my be omitted if this is your desired behaviour. If you want unique hits per hour, change the period to 3600, etc.

Here is the "unique" bug for this page, using the default built in period:     (Check the total)

Example usage in HTML:

<img border=0 src="http://site.com/path/to/counterprog?period">

Example usage in C++:

hits = unique.hit(page,ip);