NFDC Frequently Asked Questions!

How do I add a counter to my web page?

     Add a counter to your web page.

Count is a very flexible counter program written by Muhammad A. Muquit. The documentation that you will find here is mostly his work as well. The only modifications are those needed to describe the way in which Count was configured for use at the NFDC Internet Connection.

Most folks like to learn by example. So, what follows on this page are illustrations of various invocations of the Count program and their effects. However, for those who like to see all of the nitty gritty parameters, you can take a look at the reference page.

Frame color and Thickness

A frame with a bluish color is wrapped by default. You have to use ft=0 no ignore this feature.
<img src="/cgi/count.exe">

This may not work with all browsers. You should use at least one keyword in the query string (for example, df=data_file ). Random counter is displayed as no data file is specified. The default frame thickness, color and digit style is used.
<img src="/cgi/count.exe?ft=1">

No df= option, therefore random digits are displayed. Because offt=1 no frame was wrapped.

<img src="/cgi/count.exe?ft=6">
Random digits. Wrapped frame is with default color and thickness.
<img src="/cgi/count.exe?ft=10&df=yourID.ctr">
Random digits. Wrapped frame is with default color and asked thickness.
<img src="/cgi/count.exe?frgb=ffd700&df=yourID.ctr">Browser Fixed

The wrapped frame is of the asked color and default thickness. The color is used as hex string. Note, DO NOT add # before the string as you use with Netscape. In query string, if you use a #, everything after# is ignored. So, be careful.

 or you use can use the RGB triplets:
 <img src="/cgi/count.exe?frgb=255;215;0&df=yourID.ctr">Browser Fixed

or you even use the color name. You have to add this support while you configure using the Count-config script.

 <img src="/cgi/count.exe?frgb=gold|df=yourID.ctr">Browser Fixed

Comma can be displayed
<img src="/cgi/count.exe?ft=0|df=yourID.ctr|comma=T">Browser Fixed

<img src="/cgi/count.exe?ft=0|rotate=Y|df=yourID.ctr">
<img src="/cgi/count.exe?ft=0°rees=180|df=yourID.ctr">
<img src="/cgi/count.exe?ft=0°rees=90"df=yourID.ctr>

The first counter is rotated default 270 degrees toward right, no anlge is specified as rotate keyword is used.


Digit Styles
<img src="/cgi/count.exe?dd=A|df=yourID.ctr">
<img src="/cgi/count.exe?dd=B|df=yourID.ctr">
<img src="/cgi/count.exe?dd=B|frgb=69;139;116&df=yourID.ctr">
<img src="/cgi/count.exe?dd=C|df=yourID.ctr">
<img src="/cgi/count.exe?dd=D|ft=3|df=yourID.ctr">
<img src="/cgi/count.exe?ft=2&frgb=000000&dd=E|df=yourID.ctr">

These are the supplied digit styles. You can use digits from other sources. Just create a directory inside digits directory, rename the digits ro zero.gif, one.gif....nine.gif and use the directory name with dd.
Change any color

Change green color to red
<img src="/cgi/count.exe?df=yourID.ctr|srgb=00ff00|prgb=ff0000">

Negate the colors
<img src="/cgi/count.exe?netate=T&dd=A|df=yourID.ctr">Browser Fixed

Note that the digit color is negated but the frame is not.


A specific color of the digits can be made transparent on the fly. Note the counter program do not care if your gif images are transparent or not, you have to tell explicitly which color to make transparent. Here we will make the white color of the digit style E transparent. We will not use any frame either, just to make it look simple.

 <img src="/cgi/count.exe?dd=E|ft=0|tr=T|trgb=ffffff">

You can use the RGB triplets for the color:
 <img src="/cgi/count.exe?dd=E|ft=0|tr=T|trgb=255;255;255">

Make the black color of the digit style A transparent:
<img src="/cgi/count.exe?dd=A|tr=T|trgb=000000&df=yourID.ctr"> or
<img src="/cgi/count.exe?dd=A|tr=T|trgb=0;0;0&df=yourID.ctr"> or
<img src="/cgi/count.exe?dd=A|tr=T|trgb=black&df=yourID.ctr">

Make the green color of the digit style A transparent:
<img src="/cgi/count.exe?dd=A|tr=T|trgb=00ff00&df=yourID.ctr"> or
<img src="/cgi/count.exe?dd=A|tr=T|trgb=0;255;0&df=yourID.ctr">or
<img src="/cgi/count.exe?dd=A|tr=T|trgb=green&df=yourID.ctr">

Hide the counter

You can keep the counter hidden if you like. You can do this by sh=0. The hit will be recorded but the counter will not be displayed. A 1x1 transparent GIF image is written which gives the illusion. You can use the no-increment feature for monitoring those hits to a secret page (described later)

<img src="/cgi/count.exe?sh=0|df=yourID.ctr">Browser Fixed
A hidden counter is up there.

Monitor counter hits

You might have kept your counter hidden (or not). You can monitor the hits from another page just specifying the datafile and the keyword incr=F

<img src="/cgi/count.exe?incr=F|df=page1.dat">
<img src="/cgi/count.exe?incr=F|df=page2.dat">
<img src="/cgi/count.exe?incr=F|df=page3.dat">

Number of digits

Say you want to display the counter in 5 digits only.

<img src="/cgi/count.exe?md=5|df=yourID.ctr">

or you do not want to left pad with zero, you want to display exact digits.
<img src="/cgi/count.exe?pad=0|df=yourID.ctr">


You can display a string literally. The valid characters in a string are 0123456789,:-ap

<img src="/cgi/count.exe?lit=0123456789">
<img src="/cgi/count.exe?dd=B&lit=0123456789">
<img src="/cgi/count.exe?dd=C|lit=0123456789">
<img src="/cgi/count.exe?dd=D&lit=0123456789">
<img src="/cgi/count.exe?ft=0&tr=1&trgb=ffffff|dd=E|lit=0123456789">
<img src="/cgi/count.exe?lit=a1,456-:p">

Counter as clock

Display time in 12 hr format.
<img src="/cgi/count.exe?display=clock">

Dispaly time in 24 hour format.
<img src="/cgi/count.exe?display=clock|tformat=24">

Display date
<img src="/cgi/count.exe?display=date">

Use timezone parameter to display time or date of any place in the world.

Return to main FAQ page

©Copyright 2001 - NFDC Internet Connection - all rights reserved
Last modified - Monday, December 27, 2004 -




Important News

NFDC scans all incoming and outgoing email messages for virus infections!
here for more information.