Installing A Visit Counter
In order to install a counter, you will need to have an activated CGI account.
Please see How To Request A CGI Account
for more information.
There are many free counter services on the internet. However, some may share
data from your web site with some of their partner sites. The most secure counter
is one you host on your CGI server yourself. We will cover one of them here
along with basic installation instructions. Counters are probably some of the
easiest and most useful scripts to install.
Basic Visit Counter
This is a very basic low-traffic visit counter. It assumes your visitors have
JavaScript turned on. Most counters require this and most visitors do have this
feature turned on by default in nearly all browsers. The script installation is
very simple:
Extract the files from the .zip file by using an unzip utility such as WinZip for Windows. Other operating systems may have similar utilities for extracting files from a .zip archive.
Upload the following files to your server's cgi-bin directory: counter.cgi, counter.txt, and counteriplog.txt
Set the file permissions for counter.txt and counteriplog.txt to 666.
Set the file permissions for counter.cgi to 755.
In your web page html file, you can set up the counter one of two ways:
.counter { font-family: arial, sans, verdana; font-size: 8pt; color: #000000 }Change the font family (font style), size and color to suit your site's needs.
Advanced Settings:
Inside the counter.cgi you can edit the # Variables area to suit
your needs. For example, $tlimit can be adjusted to allow less or more
time before counting a page visit. By default it's set to 120 seconds
(2 minutes).
You can also set the $iplog and $countlog to use different files.
Be sure that you already have a file on your server for each and the file you
specify for $countlog must contain a number as the first line and no
other text.
This tutorial might not have been written during the release of the most current version of this script, but may work with newer versions. It is the domain owner's responsibility to be sure that any script that is run on their CGI server is secure and stable. This means making sure that the script and all it's associated files are of the most recent stable and secure version available.