Webii.net Logo
Web Hosting E-commerce Domain Name Registration Design and Development Dedicated Servers
Support
The help you need... Right now!

 

Technical FAQ

Counters and Clock

This page has been accessed times.

Introduction
You can place an odometer style counter on one or more of your web pages. Although many vital statistics can be reviewed via the stats program in your Control Panel, sometimes you may want to advertise the number of "hits" to a specific web page.

How to use
Add the following line of code to an HTML document to display a counter:

<img src="/cgi-bin/Count.cgi?df=userid" align=absmiddle>

Substitute your userid above. If you would like to add a counter to more than one page, start with key "userid1" and increment by one each time you add a new counter to another page. (ie. userid1, userid2, etc.)

This page only shows a couple of simple examples of coding a counter or clock in your HTML document. The only feature used in the preceeding example is the "df" option which 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.

For more information on the counter program, please refer to a the author's documentation at http://www.muquit.com/muquit/software/Count/Count.html


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.

And again the code is very simple,

  <IMG SRC="/cgi-bin/Count.cgi?display=clock">

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 website for complete documentation. 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-bin/Count.cgi?df=sample.dat|dd=A">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|dd=B">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|dd=C">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|dd=D">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|dd=E">


The following samples use the "dd=" option with clocks.

<IMG SRC="/cgi-bin/Count.cgi?display=clock|chcolor=T">

<IMG SRC="/cgi-bin/Count.cgi?display=clock|dd=B">

<IMG SRC="/cgi-bin/Count.cgi?display=clock|dd=C">


The "ft=" option controls the width of the frame border.

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|dd=B|ft=0">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|dd=B|ft=5">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|dd=B|ft=10">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|ft=12|frgb=25;80;8">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|dd=B|ft=10|frgb=180;30;12">


You can make the counter images opaque with the "tr=1" (transparency) option.

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|ft=0|tr=1">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|ft=12|tr=1|frgb=25;80;8">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|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.

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|ft=0|prgb=200;20;180">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|ft=0|tr=1|prgb=200;20;180">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|ft=0|tr=1|prgb=20;10;60">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|ft=0|tr=1|prgb=100;90;8">

<IMG SRC="/cgi-bin/Count.cgi?df=sample.dat|ft=0|tr=1|prgb=20;30;160">


Back to Technical FAQ


Copyright (C) Webii.net / WebXess, Inc. Est. 1996.