spacer.gif (841 bytes) North Central Kansas Community Network


News Search
Town Square
Youth Center
Senior Center
Community Economic Development

How to put a counter on your Web Page.

Always start with a very simple counter and then build it up to what you
want. Your first HTML piece should look something like this:

<img src=/scripts/counter.exe?home.html>

If this doesn't work, you will have to look carefully at how you have things

Usage: counter [-f<fg clr>] [-b<bg clr> | -t<t idx>] [-s<style>] [-n] [-d<GIF dir>] [-w<#>] [-r] < -c<#> | <item> >

-f<fg clr> - color to render foreground in.
-b<bg clr> - color to render background in.
-t<t idx> - index to color which should be transparent.
-s<style> - name of number style (#style.gif).
-n - no increment, just build GIF.
-d<GIF dir> - directory where digits are located relative to the location of this program.
-w<#> - width of counter in # of digits.
-r - raw, no HTTP prefix. not useful in HTML, only on the command line.
-h - hidden, builds a transparent one by one GIF.
-c<#> and <item> are exclusive.
-c<#> - specify the number which you want to build. Ignores <item> and log.
<item> - unique identifier for counting. Usually name of page. (Best to use your Username)

Here are some examples of our pages:

From the Home page of NCKCN:
<img src="/scripts/counter.exe?-f0000FF+-bFFFFFF+home.htm">
(Has Blue digits with a white background)

From Ian Draemels web page:
<IMG SRC="/scripts/counter.exe?-t0+-f0000FF+ianspage.html">
(Has transparent black color and blue digits)

Some More Advanced And Complicated Examples

HTML Example: <img src=/scripts/counter.exe?-f0000FF+-bFF0000+home.html>

This will put the graphic in your page. The last argument I use in a log
which is created in the directory where the program resides. This allows you
to have the count be updated. You can also have many counts using only one
program, by just passing different names. This will create BLUE numbers on
a RED background using the default digits.

Another HTML Example: <img src=/scripts/counter.exe?-t0+-f00FF00+home.html>

This will create GREEN numbers on a TRANSPARENT background using the
default digits.

Yet Another HTML Example: <img src=counter.exe?-scb+home.html>

This creates numbers using the "cb" style. It will look for the GIF files
in the "cntrgifs" directory, with the following names: 0cb.gif, 1cb.gif,
2cb.gif, ...

Separating Parameters
On some servers, it is necessary to use a "&" instead of "+" to separate parameters to the counter.

Specifying Colors
When you are specifying colors you must use the following format. RRGGBB, where each pair represents a hexadecimal number. You must include all necessary zeros.

Example: FF0000 - Bright Red
Example: 00FF00 - Bright Green
Example: 0000FF - Bright Blue

Have fun! Oh, by the way; if you are using MS Frontpage, it comes with its own counter. You might want to use it instead.

If you have support or general questions please email us at:
If you have any comments or questions about the NCKCN System, you can reach NCKCN by e-mail at:

This page last updated 01/16/12 01:31:27 PM
1996-2012 North Central Kansas Community Network