Simple Counter 2.5 (text)
Simple Counter 2.5 (graphical)
The only file you need to copy to your /cgi or /cgi-bin directory is
counter.cgi and set its permission to
755. The rest, counter.cnt, will be created by the script. Make sure,
you rename "counter_cgi.txt" to "counter.cgi", after downloading it
from here!
In counter.cgi a few variables need to be set up. If you are using
it as a text counter, you only need to specify the domain name, you
want the counter to work on.
The counter.cnt text file looks like this:
index.shtml:32:192.246.87.76|links.html:169:114.115.16.21
The number after the file name is the number of hits for that page.
You can change this value, if you want to.
To use your counter, you must insert a Server Side Include (SSI)
statement into your web page, which you may have to name with the
.shtml extension. For each page, the counter is on, you just change
the file name, because only 1 web page can use the script at a time.
If you try more, than 1 web page to share the script, your counter.cnt
file will stop advancing. This must be some caching-related bug, but
otherwise the script works fine.
For a text counter it would look like this:
<!--#include virtual="/computers/webdesign/cgi/perl/counters/simplecounter/cgi-bin/counter.cgi?file=simplecounter-text.shtml&type=text"-->
For a graphical counter it would look like this:
<!--#include virtual="/computers/webdesign/cgi/perl/counters/simplecounter/cgi-bin/counter.cgi?file=simplecounter-graphical.shtml"-->
Just type counter.cgi?stats to check the stats of the counter!