"Privacy Aware" Unique Hit Counter for PHP

This PHP class provides a hit counter that is able to count unique hits without directly recording each visitor's IP address. It does so by recording only a cryptographic hash of the IP address and page name. By hashing the IP address with page name as salt, you prevent yourself from being able to track a user as they navigate your site. You also prevent yourself from being able to recover anyone's IP address without brute forcing through all of the assigned IP address blocks in use by the internet.


It is very easy to use. All you need is PHP and a single MySQL database. All the documentation you will need is in the source code file which is licensed under the GNU GPL v3.

PHP Source Code

Source Code on GitHub