Putting counters on your pages
Putting counters on your pages

With any of our accounts, you have the ability to put counters on any of your pages. These are those "we have had 18273 visits since 1 October 1990" type messages you sometimes see on certain pages. If you would like visitors to know how popular your site is, this is a good way to do it.

To put a counter on your page, use the following code in your .html or .htm file:

<IMG SRC="/Count.cgi?df=domain-xxxx">

where domain is your domain name and xxxx is a unique number corresponding to the page on which you have the counter (just make up any 4-digit number). For example:

<IMG SRC="/Count.cgi?df=seagull.net-2468">

When the web server encounters this line in your file, it will replace it with a graphic image showing the count. For example, the following lines:

We have had <IMG SRC="/Count.cgi?df=seagull.net-2468"> hits since yesterday.

will appear like this to browsers: We have had hits since yesterday.

Starting at a number higher than 1

If you want to start a counter at a certain number, use the st option. Here is an example that will start the counter at 5000:

<IMG SRC="/Count.cgi?df=domain-xxxx&st=5000">

Using different styles

There are several different styles of counters available. You can use the one that most suits your fancy by using the df option. Use a letter from A to F. If you don't supply the df option, the counter defaults to style A. For example:

<IMG SRC="/Count.cgi?df=seagull.net-2468&dd=B">

shows:

<IMG SRC="/Count.cgi?df=seagull.net-2468&dd=C">

shows:

<IMG SRC="/Count.cgi?df=seagull.net-2468&dd=D">

shows:

<IMG SRC="/Count.cgi?df=seagull.net-2468&dd=E">

shows:

<IMG SRC="/Count.cgi?df=seagull.net-2468&dd=E">

shows:

Other settings

You can change the characteristic of counters by using these options: ft (frame thickness), frgb (frame color in rgb), md (maximum digits from 5 to 80), pad (turn padding with zeroes on or off), comma (display commas), or degrees (rotate counter by 90, 180, or 270 degrees). Examples:

<IMG SRC="/Count.cgi?df=seagull.net-2468&ft=10">

shows:

<IMG SRC="/Count.cgi?df=seagull.net-2468&ft=10&frgb=ff00ff">

shows:

<IMG SRC="/Count.cgi?df=seagull.net-2468&ft=10&frgb=ff00ff&md=8">

shows:

<IMG SRC="/Count.cgi?df=seagull.net-2468&ft=10&frgb=ff00ff&md=8&pad=0">

shows:

<IMG SRC="/Count.cgi?df=seagull.net-2468&ft=10&frgb=ff00ff&md=8&pad=0&comma=1">

shows:

<IMG SRC="/Count.cgi?df=seagull.net-2468&ft=10&frgb=ff00ff&md=8&pad=0&comma=1°rees=270">

shows:

That's it. Now, you're off and running with counters!


Go back to the Virtual Site Administration Page