Adding Counters, Clocks, and Dates
Posted on 16 December 2003 10:09 AM
Note: The scripts located in this section are only available for use on a web site that is hosted by FutureQuest®. You are welcome to view the individual script pages for links to the author's homepage, when available, for your further investigation. |
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>
The counter program is very powerful, although this page only shows a couple of simple examples. The only feature used in the above example is the "df" option that lets you name the file used to hold the count. Every page that 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:
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 set up a counter automagically and view many of the 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:
The following samples use the "dd=" option with clocks:
Here they are with the "Date" option:
The "ft=" option controls the width of the frame border:
Rotate the counters and clocks with the "degrees=" option added in:
You can make the counter images opaque with the "tr=1" (transparency) option:
For the default counter, changing the color of the numbers is easy with the "prgb=" option:
What's the maximum number of hits the counter can handle?
How can I change the starting number or reset the counter?
The counter seems to display a random number. What's the problem?
The counter is not counting?
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