Adding a counter
to your page

There are many ways to add a counter to your web page. Several "free" on line services offer hit counters, such as http://www.amazingcounters.com/ . These free counters usually display a hit count on your page without any commercial ads.  Going to the site of the counter provider will usually bring out the ads.

You can also add counters that work right on our system, such as the counter shown below.

There have been 212 visits to this page!
You can use a simple text counter on your page. This counter requires the use of Server Side Includes (SSI). That means that our web server will process the counter operation and dynamically include the information on your web page. You will need to change the extension of your web page. Instead of using the .htm or .html extension, you must use the .shtml extension. That tells the server to look in the web page for a processing command. You will then need to add the following SSI processing command to your web page:

<!--#include virtual="/bin/counter/counter.cgi"-->

Add the line above in the location where you want the number to appear. For example, this page has the counter command between the been and visits in the red line above. If you look at the source code for this page, you will not see the command. The server has dynamically generated the html based on the command. The preprocessed html page source code looks like this.

<p>
<b><font face="Arial,Helvetica"><font color="#660000">There have been
<!--#include virtual="/bin/counter/counter.cgi"--> visits to this page!</font></font></b>

Another interesting counter is the Roman Numeral counter. This counter will tell you that this page has been viewed CCXII times. This script is an SSI (requires .shtml extension) and requires the code here:

<!--#exec cgi="/bin/counter/roman.cgi" -->

You will need to check you web page editor on how to manually add HTML tags, or you can use a text editor, like Windows Wordpad, and add the counter where you want. 

 

Return to the Tools index page.