The Counter

Instructions for setting up and configuring a basic page visit counter.

 

Installing the counter

Setting a Starting number

Resetting the counter

Adding features to the counter

-Changing the Digit Style

-Customizing the Border

-Specifying a transparent color

-Rotating the counter

-Using Multiple Counters

-Configuring the numbering

 

 

Installing the counter

Putting a counter on your page is very easy. If you were to place the following tag within the HTML for one of your web pages (assuming that "your_user" is your account username):

<img src="/cgi-bin/count/Count.cgi?df=your_user.dat">
Then you would see:

 

 

Setting a Starting number

If you want your counter to begin with a specific number, you can specifying a starting amount with the "st" option. Note: For the starting number to take effect, you may need to reset your counter. If you wanted to begin your counter at 500, you would add this code to your page:

<img src="/cgi-bin/count/Count.cgi?st=500&df=your_user.dat">

 

 

Resetting the counter

If you want to reset your counter to zero or to any starting number, you must rename the ".dat" file. Changing the "df" value to something like "your_user890.dat" will start a new counter for you, beginning at zero.

 

 

Adding features to the counter

 

You may also adjust various aspects of the counter, such as the style of digits displayed, the frame thickness, and a slew of other options. All options can be combined using the "&" symbol.

 

 

Changing the Digit Style

Customizing the Border

Specifying a transparent color

Rotating the counter

Using Multiple Counters

Configuring the numbering

Displaying a fixed number

 

Changing the Counter's Digit Style

There are a many ways to change the digit style of your counter. There are five digit styles, and each style can be shown with inverted colors. The table below shows all of the possible combinations, and provides code snippets for each.

Style A (Code: dd=A)
<img src="/cgi-bin/count/Count.cgi?dd=A&df=your_user.dat">
Displays:
style A
Style A Inverted (Code: dd=A&negate=Y)
<img src="/cgi-bin/count/Count.cgi?dd=A&negate=Y&df=your_user.dat"> 
Displays:
style A Negate
Style B (Code: dd=B)
<img src="/cgi-bin/count/Count.cgi?dd=B&df=your_user.dat">
Displays:
style B
Style B Inverted (Code: dd=B&negate=Y)
<img src="/cgi-bin/count/Count.cgi?dd=B&negate=Y&df=your_user.dat">
Displays:
style B Inverse
Style C (Code: dd=C)
<img src="/cgi-bin/count/Count.cgi?dd=C&df=your_user.dat">
Displays:
style C
Style C Inverted (Code: dd=C&negate=Y)
<img src="/cgi-bin/count/Count.cgi?dd=C&negate=Y&df=your_user.dat">
Displays:
style C Inverse
Style D (Code: dd=D)
<img src="/cgi-bin/count/Count.cgi?dd=D&df=your_user.dat">
Displays:
style D
Style D Inverted (Code: dd=D&negate=Y)
<img src="/cgi-bin/count/Count.cgi?dd=D&negate=Y&df=your_user.dat">

Displays:
style D Inverse
Style E (Code: dd=E)
<img src="/cgi-bin/count/Count.cgi?dd=E&df=your_user.dat">

Displays:
style E
Style E Inverted (Code: dd=E&negate=Y)
<img src="/cgi-bin/count/Count.cgi?dd=E&negate=Y&df=your_user.dat">

Displays:
style E Inverse

 

 

Customizing the border

You can add a border to your counter. The default color is blue, but you can adjust it's thickness and color to suit your needs.. The example below shows the relevant code to add to your tag:

<img src="/cgi-bin/count/Count.cgi?ft=VALUE&frgb=VALUE2&df=your_user.dat">
Here, you would replace "VALUE" with a number specifying the width of the counter border in pixels. Use 0 (zero) to remove the border entirely. To customize the color, replace "VALUE2" with a hexadecimal color value. So to display a counter with an orange border fifteen pixels wide the tag would read:
<img src="/cgi-bin/count/Count.cgi?dd=C&ft=15&frgb=ff6600&df=your_user.dat">
And show:
style with border

 

 

Specifying a transparent color

You may want part of your counter to show the background color behind it, in which case you would specify a transparent color. Here, you would replace the "VALUE" with "Y" to enable transparency or "N" to disable it (a handy feature for testing). The "VALUE2" variable would be replace with the color that you want to be transparent. The transparency code would appear in your tag as such:

<img src="/cgi-bin/count/Count.cgi?tr=VALUE&trgb=VALUE2&df=your_user.dat">

 

 

Rotating the counter

If you want to rotate your counter 90, 180 or 270 degrees this tag can help. Here you would replace "VALUE" with a "Y" to enable rotation, or a "N" to disable rotation. "VALUE2" is then set with 90, 180, or 270. All other rotations will be ignored.

<img src="/cgi-bin/count/Count.cgi?rotate=VALUE&degrees=VALUE2&df=your_user.dat">

 

 

Using More than One Counter

If you wish to place a counter on separate pages, this is fine. In the call to the counter, simply increment the number after your username for each additional page. For example, the first page will use the tag:

<img src="/cgi-bin/count/Count.cgi?df=your_user.dat">
The second page using the counter should use the tag:
<img src="/cgi-bin/count/Count.cgi?df=your_user-page2.dat">

 

 

Configuring the counter numbers

You can configure the number of digits the counter displays, and if there should be padding zeroes. The table below shows the variables and sample code.

md=VALUE

The "md" value sets the number of digits that the counter will display. Once the limit is hit, the counter will stop recording. Valid values for "md" range between 5 and 10.
<img src="/cgi-bin/count/Count.cgi?md=7&df=your_user.dat">

pad=VALUE

"pad" sets whether or not to display leading zeroes to fill the counter. Valid values for "pad" are Y or N
<img src="/cgi-bin/count/Count.cgi?pad=N&df=your_user.dat">

 

 

Displaying a Fixed Number

If you want the counter to display the same number every time, and not do any recording, you can use the "lit" tag. Just replace "VALUE" with the number that you want the counter to display.

<img src="/cgi-bin/count/Count.cgi?lit=VALUE&df=your_user.dat">

 

 

If you need any help with the counter, please let us know!

Was this answer helpful?

 Print this Article

Also Read

WordPress

A few notes about installing WordPress :   - WordPress is a third party software. We do not...

Form-to-Email

This script is from Matt's Script Archive, and is one of the most widely used form-to-email...

Majordomo Subscription Form

Configure our script that allows visitors to subscribe or un subscribe to your majordomo mailing...

Secure Form-to-Email

How to implement our secure form-to-email script. Our secure form protects your visitors...

Perlfect Search Tool

How to install and configure the Perlfect Search script and integrate it into your website.   A...