Simple web page counter

 

The following is a simple web page counter based on the counter described on TechTV Add a Counter to Your Webpage by Leo Laporte.

 

The nice thing is it is a counter that will only count one page on your web page.

1st download these files.
 

When you unzip the files you will find 3 files.

count.txt - this is a text file and has one number in it.  This is the starting number for the counter.

counter.pl - this is the Perl program that does the counting

counter start.shtml - this is a web page you can use for a starter page or go in and get the html you need.  Note - the extension must be shtml.

 

Now use any text editor like NotePad to change the number in count.txt to what you want the starting number to be.  Currently it is 1.  If you want the counter to start at 1, you can skip this step.

 

Copy count.txt and counter.pl into your cgi-bin directory of your web page.  You will need to give count.txt world read/write permissions with a "chmod 666" (check your ftp program on how to do this but in cuteFTP you can just right click the file on the server and select "chmod" and change it.  Also on the counter.pl file you will need to set the chmod to 755.

 

Use the counter start.shtml as your page or copy the following html code to the place in your web page you want to have the counter.

 

This page has been viewed <!--#include virtual="/cgi-bin/counter.pl"--> times since xx / xx / xxxx.

 

Change the xx / xx / xxx to your start date.

 

For more information see:

Add a Counter to Your Webpage by Leo Laporte.

 

To see an example of the counter go to:  http://www.doylesdartden.com/gis.shtml