Linux Hosting : Web Counter

A counter may be configured for your site. This may all be done in the control panel under CGI Center and Counter. Although a counter may be placed on your site, we recommend that you don't use a counter. With the advanced reports that are available to you, a counter is fairly outdated.

To show your counter value on your page, you use the HTML tag for an image, but the image source is actually the output of a cgi program called "/Count.cgi". For example, let's say your account name is hanson. To show your counter, you would put this code in your HTML document:

<img src="/cgi-sys/Count.cgi?df=ona.dt&dd=A">

and it would look like this:

The string between the ? and " is called the QUERY_STRING, which in this example is df=hanson.dt&dd=A. Make sure there are no line breaks in the <img src=> line and no spaces in the QUERY_STRING. The df=cfile is the first option, where cfile is the counter data file name. The & separates the various options. The second option given is dd=1, the dd means "This is the digit style I want" and 1 is the style number. Currently, we have about 45 styles of digits, look at the counter digits page to see all of them.

The counter program has lots of arguments, you can make it work and look the way you desire. In the query string, you can use the arguments described below. Here's another example:

<img src="/cgi-sys/Count.cgi?df=ona.dat&dd=N">

and it would look like this:

Default: display=counter

timezone=X

Purpose: Specifies timezone.

Usage: The parameter timezone= is only significant with display=clock or display=date. Use this parameter if you want to display the time or date of another timezone. For example, central time with daylight saving time, timezone=GMT-0600.

If the clock displays your local time wrong, you must specify your timezone with that parameter in order to display the correct time.

Default: None.

dformat=X

Purpose: Specifies date format.

Note: This parameter is only significant with display=date.

Usage: The valid value for the string parameter X is any combination of MMDDYY (Month-Day-Year). For example, dformat=ddmmyy, dformat=YYMMDD.

Default: dformat=MMDDYY

ft=X

Purpose: Frame Thickness

Usage: You can wrap the counter in an ornamental frame of X pixels thick. Use 0 for no frame. Values over 5 make a nice 3-D effect.

Default: ft=6

frgb=R;G;B

Purpose: Frame Color

Usage: Specifies the color of the frame in RGB (red/green/blue) format. Each color component, R, G, and B is specified as a value between 0 and 255. If you use ft= without a frgb= param, the default color is used.

If you specify a frgb= without a ft=, then the frame thickness defaults to 5. All the examples show ft=5. The color can be specified as hex string or a name. Do not use a # before the hex string as Netscape. For example, if you want to specify white in hex, you do frgb=ffffff.

Default: frgb=100;139;216 (frgb=648bd8)

tr=B

Purpose: Transparency On/Off

Usage: You can specify if your counter image will have a transparent color with the Boolean B. So tr=Y means there will be a transparent color; and tr=N means there will not. It does not matter if the GIF files used for the digits are "transparent"; you must specify explicitly which color to make transparent. If you specify a trgb=, then you do not need to specify tr=Y. Valid values for B are Y, N, T, F, 1, or 0. tr=N

Default: No Transparency

md=X

Purpose: Max Digits

Usage: Defines maximum number of digits to display. Any value between 5 and 10 inclusive are permitted. Padding with leading zeros is automatically done for you; longer counts are truncated to the given X.

Default: md=6 without padding

pad=B

Purpose: Padding with 0's

Usage: Turn padding on/off in conjunction with md= setting. Valid values for the Boolean parameter B are Y, N, T, F, 1, or 0.

Default: pad=Y

dd=#

Purpose: Digit style

Usage: Denotes a specific style of digits. See the digits sample page for examples of the styles available.

Default: dd=A

sh=B

Purpose: Show digits

Usage: Used to turn display of digits on or off according to the Boolean B. When sh=T, counter will be displayed and incremented, this is the default behavior.

If sh=F no digits will show, but the counter will still increment; instead of digits a transparent 1x1 GIF is displayed. Valid values for the Booleanparameter B are Y, N, T, F, 1, or 0

Default: sh=Y

df=data_file

Purpose: Datafile to store count

Usage: Specifies the name of the file for storing the count in. The file must be allocated to you as was mentioned in the "Authorizations" section above. You can use df=random to display a random number.

One special use of the parameter is df=RANDOM. This returns a random number using the fractional portion of the host's time of day clock as a seed for the generator. Unlike all other WWWcounter parameters, the file name provided is case-sensitive, except for the value random. Or Random, or rANDOM, etc.

Default: df=random

incr=B

Purpose: Increment Count

Usage: Makes it possible to display the current count without incrementing the count. This can be used to examine the count for reporting or other purposes without adding to the count. Valid values for the Boolean parameter B are Y, T, and 1 to increment, N, F, and 0 to not increment.

Default: incr=T

lit=X

Purpose: Display literal

Usage: Makes it possible to display a given, predetermined value. Valid values for the string X are digits.

Default: None

negate=B

Purpose: Negate the color

Usage: Makes it possible to negate the color of the counter digits. Note that the Frame is exempted from negating. Valid values for the Boolean parameter B are Y, T, and 1 to negate, N, F, and 0 to not negate.

Default: negate=F

degrees=X

Purpose: Rotate X degrees

Usage: Makes it possible to rotate the counter image X degree. The possible values of X is 90, 180, 270 and 360. Note 360 is meaningless as the counter will come back to the original 0 degree.

Default: degrees=270

rotate=B

Purpose: Rotate On/Off

Usage: The Boolean value B turns on or off rotating. If you use degrees= settting, rotate is not needed. Valid values for the Boolean parameter B are Y, N, T, F, 1, or 0. rotate=F

Default: Do not rotate



onahosting.com is a division of Onalaska Web offering Red Hat Linux web hosting
©Copyright Onalaska Web - a web design and hosting company, All Rights Reserved
Send mail to support@onalaskaweb.com for assistance.