Skip to content

A simple PHP and JavaScript AJAX hit counter that counts and displays the number of hits for each page on your website.

License

Notifications You must be signed in to change notification settings

robsd/php-hit-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

php-hit-counter 🎯

A simple PHP and JavaScript AJAX hit counter that counts and displays the number of hits for each page on your website.

Installing on your own site

  1. Create a <span id="hit-count"></span> element on every page where you want to display the hit count number for that page.
  2. Copy the <script src="hit-counter/js/script.js"></script> declaration on every page you created the above element on.
  3. Copy the hit-counter folder to your web server.
  4. Thats it! If everything works, you should start seeing the hit count being displayed on each page you added it to and the hit-counter/hits.json file being populated.

Need a hint?

See the example.html file for how to create the element and declare the JavaScript.

Support my work

If you like this repo or used any of the code, please star ⭐ it and consider supporting me below...

ko-fi

About

A simple PHP and JavaScript AJAX hit counter that counts and displays the number of hits for each page on your website.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published