Counters, Clocks, and Dates
Adding a counter to a page is very easy. All you need to do is place an
"<IMG SRC=...>" tag in your page that calls the counter program.
For instance, this page has been accessed, times so far. The
HTML tag to generate that graphic is simply:
<IMG SRC="/cgi-sys/Count.cgi?df=FileName.xxxx" align=absmiddle>
Now the counter program is very powerful, this page only shows a couple of simple examples. The only feature used in the above example is the
"df" option that let's you name the file used to
hold the count. Every page which contains a reference to the
"Count.cgi" script with the same filename on the
"df=XXX" tag will update the same number. So you can
share counters among a number of pages, or have independent counters.
Here's another example, using the Count.cgi script to print a digital clock
instead of a page counter. The current time here on the East Coast is , To change time zones
you only need to add the timezone=GMT-0100 for any difference
from GMT.Again the code is very simple,
<IMG SRC="/cgi-sys/Count.cgi?display=clock">
You can even change the colors, frames, transparency and more. FutureQuest®
has also installed a variety of different images you can use for your counters.
Click Here to use the CNC to set up a counter automagically and view many of the Counter/Clock/Date Image Options.
Here are some examples of the (very extensive) options available for
controlling the look and feel of the counter program. Please refer to the author's homepage for
complete documentation (Note: FutureQuest® has pre-installed version 2.4 of this software). You can cut-n-paste any of the following and experiment
if you like. The HTML required to produce each of them is listed to the right of
the graphic.
The "dd="
options controls the digit style.
<IMG
SRC="/cgi-sys/Count.cgi?df=cfile1|dd=A">
<IMG SRC="/cgi-sys/Count.cgi?df=cfile|dd=B">
<IMG SRC="/cgi-sys/Count.cgi?df=cfile2|dd=C">
<IMG SRC="/cgi-sys/Count.cgi?df=cfile2|dd=D">
<IMG SRC="/cgi-sys/Count.cgi?df=cfile2|dd=E">
The following samples use the
"dd=" option with clocks.
<IMG
SRC="/cgi-sys/Count.cgi?display=clock">
<IMG
SRC="/cgi-sys/Count.cgi?display=clock|chcolor=T">
<IMG
SRC="/cgi-sys/Count.cgi?display=clock|dd=B">
<IMG
SRC="/cgi-sys/Count.cgi?display=clock|dd=C">
Here they are with the "Date" Option.
<IMG
SRC="/cgi-sys/Count.cgi?display=date">
<IMG
SRC="/cgi-sys/Count.cgi?display=date|chcolor=T">
<IMG
SRC="/cgi-sys/Count.cgi?display=date|dd=B">
<IMG
SRC="/cgi-sys/Count.cgi?display=date|dd=C">
The "ft="
option controls the width of the frame border.
<IMG
SRC="/cgi-sys/Count.cgi?df=cfile|dd=B|ft=0">
<IMG
SRC="/cgi-sys/Count.cgi?df=cfile|dd=B|ft=5">
<IMG
SRC="/cgi-sys/Count.cgi?df=cfile|dd=B|ft=10">
<IMG
SRC="/cgi-sys/Count.cgi?df=cfile|ft=12|frgb=25;80;8">
<IMG
SRC="/cgi-sys/Count.cgi?df=cfile|dd=B|ft=10|frgb=180;30;12">
Rotate the counters and
clocks with the "degrees=" option added in
<img
src="/cgi-sys/Count.cgi?df=cfile|dd=B|degrees=270|ft=10">
<img
src="/cgi-sys/Count.cgi?df=cfile|dd=B|degrees=180|ft=10">
<img
src="/cgi-sys/Count.cgi?df=cfile|dd=B|degrees=90|ft=10">
You can make the
counter images opaque with the "tr=1" (transparency)
option.
<IMG
SRC="/cgi-sys/Count.cgi?df=xx|ft=0|tr=1">
<IMG
SRC="/cgi-sys/Count.cgi?df=xx|ft=12|tr=1|frgb=25;80;8">
<IMG
SRC="/cgi-sys/Count.cgi?df=xx|dd=C|ft=10|tr=1|frgb=180;130;2">
For the default counter,
changing the color of the numbers is easy with the
"prgb=" option. click here for a color chart
<IMG
SRC="/cgi-sys/Count.cgi?df=abc|ft=0|prgb=200;20;180">
<IMG
SRC="/cgi-sys/Count.cgi?df=abc|ft=0|tr=1|prgb=200;20;180">
<IMG
SRC="/cgi-sys/Count.cgi?df=abc|ft=0|tr=1|prgb=20;10;60">
<IMG
SRC="/cgi-sys/Count.cgi?df=abc|ft=0|tr=1|prgb=100;90;8">
<IMG
SRC="/cgi-sys/Count.cgi?df=abc|ft=0|tr=1|prgb=20;30;160">
The counter seems to reset to zero occassionally, what's going
on? Answer: The counter program does NOT check for disk capacity. If
you are out of disk space, and if a page is accessed at this time, the data file
associated with this page will be reset to zero. It is a bug/feature that exists in
all versions of the counter. So watch your disk capacity carefully.
What's the maximum number of hits the counter can handle?
Answer: By default compile time option, it can handle digits up to 80 characters long.
Now a pop quiz, if a site gets one million hits/day, in which year will the
counter overflow?
How can I reset the counter?
Answer: To reset the counter, you need to have access to the datafile specified with the df= parameter. You do
not have access to this file. Your options are ask the sys admin very nicely and if he's not too busy he'll do it
for you. Or the better option, just change the file name it's calling in your web page document.
The counter seems to display a random number. What's the problem?
Answer: If you do not specify a datafile with df= parameter, the counter will display a random number.
The Counter Is Not Counting?
Answer: The counter never counts the same IP address two times in a row. Please click here for a more detailed explanation.
For more information on the counter program, please refer to the author's
extensive notes on the subject. The URL for his homepage is http://www.muquit.com/muquit/software/Count/Count.html
Back to Top
|