If you want to count other pages, you have to specify the name and location
of the counter, such as in:
Only alphabetic characters (both capital and lower case), digits and the
'/', '_' characters are allowed. All other characters are ignored.
The counter currently runs under Linux and the CERN http deamon, but it can be compiled on most Unix
systems. The deamon must have write access to the counter files since "nph-count"
runs under this deamon and must be able to change the contents of the counter files.
The executable must placed in the "cgi-bin" directory, which
normally requires root access to the system (although some servers do allow users to
have their own cgi-bin scripts).
The source code(28K) of nph-count
version 0.94 is now availabe!
What does it do?
This counter counts the number of accesses to a certain page. This is done
by refering to a program in /cgi-bin/(usually called script) which
increases the counter and returns a picture of the current value. So each
access to a HTML page results increases this counter.How do I use it?
If you want to count accesses to your homepage, you simply have to include a
reference to:
< IMG SRC="/cgi-bin/nph-count" >
and create file named counter.cnt This file should containt the value "0"
and it should have read and write permission for the deamon running this program.
< IMG SRC="/cgi-bin/nph-count.gif?PATH/FILE" >, with
PATH=the path within the WWW space and
FILE=the filename of the counter without extension
For security reasons, the extension ".cnt" will be added to the filename. This
ensures that no other files than files with extension ".cnt" will be written to.Advanced options
All the advanced options must be put in the counterfile after the line with
the counter value. The counterfile will look as follows:
43
option1=value1
option2=value2
Automatic reset
This counter is able to reset automatically each hour, day,
week or month.
This is done be adding the following line to the counterfile:
reset=h
In that case the counter will be reset every hour. Before the reset the
current value will be added to the counter file, to be used in statistics.
Netmasking
To filter out some hosts which accesses are not to be counted, you can add a
netmask. This is done by adding the following lineto the counterfile:
netmask=130.89.30.9?
In that case all hosts from Scintilla (130.89.30.90 through 130.89.30.99)
will not increase the counter. These hosts will increase a second counter.
Advanced commandline options
After the counterfile name the following options can be used:
Examples
< IMG SRC="/cgi-bin/nph-count?~frank/count" >
Will access "~frank/count.cnt" and increase it.
< SRC="/cgi-bin/nph-count?~frank/count+NOCOUNT" >
Will access"~frank/count.cnt" and not increase it.
< SRC="/cgi-bin/nph-count?~frank/count+MASKED+NOCOUNT" >
Will access"~frank/count.cnt" and show the masked accesses and not increase it.
< IMG SRC="/cgi-bin/nph-count?~frank/count+STATS+NOCOUNT" >
Will show the statistic of the last 30 days.Source code
The source code of "nph-count" is written in GNU C++. The counter utilises an adapted
version of the GIFSave(10K) functions written by
Sverre H. Huseby. The source:
"GIFSave.zip"(13K) is on this server available.More information?
If you have more questions about this counter, or are interested in the C source, please don't
bother to hesitate and send a mail to Frank Cremer.
March 28th 1996 Frank Cremer