Inserting visitors counter on your webpage?

April 2018

To insert a visitor counter on your webpage, you will need a script to be copied into the HTML of your page index

Please follow these steps carefully:
  • Copy the script into the HTML of your index page to the places where you want the number of visitors appears.
  • Change the last line (echo "$ nbvisites") to customize the text of your counter.

Caution: Do not modify the text, not the variable $ nbvisites!
echo "You are the $ nbvisites visitors since 12/08/2001";
echo "You are the $ nbvisites visitors to browse my site";
  • Rename the page with the extension. Php or. Php3 or. Php4

Example: If your page is called index.htm, his new name is index.php

-*Create the text file compteur.txt and put it in the same directory as your index.php page

For a content in PHP, this is the PHP Script:

Thanks to furious_wolf for this tip on the forum.
Published by aakai1056. Latest update on April 17, 2010 at 07:24 AM by aakai1056.
This document, titled "Inserting visitors counter on your webpage?," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (
Explanation of the URL
Webmaster - Create a forum on his website