Our new graphical counter is very versatile. It can use five different
digit styles, wrap a frame around the counter, show the time or date, and
much more. This document demonstrates how to use these features. Each
feature, or parameter has an alpha code followed by a value. Multiple
parameters come be combined within a single counter with each parameter
being separated either by a | or a &.
The counter above shows the simplest form of the counter command:
<IMG SRC = "/cgi-bin/Count.cgi?df=crc1.dat|st=1234">
Parameters used - df = datafile, st = preset start number
Note that we preset the counter to a value of 1234 using the
"st" parameter. To preset your counter, just place the number you wish to
preset it to after the "st=". Note that the counter must not already
exist if you wish to preset it.
Frame Color and Thickness
This is what happens when you call the counter with no parameters.
<img src="/cgi-bin/Count.cgi">
No Parameters used
Not all browsers will handle this situation correctly. What you should
see here is it complaining about an empty query string, with a blue
frame. These are the default settings. The text should be green on
black.
<img src="/cgi-bin/Count.cgi?ft=0">
Parameters used - ft = frame thickness
Because the datafile parameter (df) is not present, a randomly
generated counter number is used. The "ft=0" parameter tells Count to not
put a frame around it.
<img src="/cgi-bin/Count.cgi?ft=6">
Parameters used - ft = frame thickness
This is the way to create a random counter with default frame color and
thickness. "ft" sets the frame thickness in pixels, and the default
happens to be six pixels.
<IMG SRC="/cgi-bin/Count.cgi?ft=10&df=crc1.dat">
Parameters used - df = datafile, ft = frame thickness
This counter is NOT random, as it uses crc1.dat for the data file. The
"df" parameter specifies this data file. To create your own counter,
simply use the "df=xxxxxxn.dat" parameter. The xxxxxx must be your
username, the n must be a number, and you must have the .dat. If your
username is eager, your first counter would be eager1.dat, your second
counter would be eager2.dat, etc. This sample counter has a frame
thickness of ten (ft=10).
<IMG SRC="/cgi-bin/Count.cgi?frgb=ffd700&df=crc1.dat">
Parameters used - df = datafile, frgb = frame color (Frame Red,Green,
Blue)
You change the frame color with the "frgb=xxxxxx" parameter, where
xxxxxx is a six character hex value, just like you use in html
coding. There is one important difference here, though. You must NOT put
a # in front of it. This will truncate the parameter line at that
point! This is not our fault, it is the fault of the people who wrote the
HTML spec. This is a gold frame. Other hex values yield different colors.
Instead of hex values, you can use RGB triplets, like this;
<IMG SRC="/cgi-bin/Count.cgi?frgb=255;215;0&df=crc1.dat">
which gives the same result.
Your count can have commas!
<img src="/cgi-bin/Count.cgi?ft=0|df=crc1.dat|comma=T">
Parameters used - df = datafile, ft = frame thickness, comma = show
commas
To use commas, simply add the parameter "comma=T". T is for True,
meaning that it's True you want to use commas. Note that your counter
will not be padded with zeroes if you use commas.
Rotating your counter
<img src="/cgi-bin/Count.cgi?ft=0|rotate=Y|df=crc1.dat">
<img src="/cgi-bin/Count.cgi?ft=0°rees=180|df=crc1.dat">
<img src="/cgi-bin/Count.cgi?ft=0°rees=90|df=crc1.dat">
Parameters used - df = datafile, ft = frame thickness,
rotate = rotate counter 270 degrees, degrees = degrees to rotate
By default, the counter will rotate 270 degrees clockwise. It can only
be rotated in increments of 90 degrees. The "rotate" parameter tells it
to rotate. The "degrees" parameter tells it how much to rotate. Also
note that these have no frame.
You get five digit styles!
<img src="/cgi-bin/Count.cgi?dd=A|df=crc1.dat">
<img src="/cgi-bin/Count.cgi?dd=B|df=crc1.dat">
<img src="/cgi-bin/Count.cgi?dd=C|df=crc1.dat">
<img src="/cgi-bin/Count.cgi?dd=D|ft=3|df=crc1.dat">
<IMG SRC="/cgi-bin/Count.cgi?ft=2&frgb=000000&dd=E|df=crc1.dat">
Parameters used - df = datafile, dd = digit style (a-e)
ft = frame thickness, frgb = frame color
These are your five style choices. You use the "dd=X" parameter to
specify digit styles. X may be any of the first five capital
letters. Style A is the default.
The Wonderful World of Color Modification
If you know the hex values of the colors in the digit styles, you can
change them. This is how to change the green color in the first digit
style to red.
<img src="/cgi-bin/Count.cgi?df=crc1.dat|srgb=00ff00|prgb=ff0000">
Parameters used - df = datafile, srgb = source RGB value.
prgb = pen (New) RGB value
"srgb" is the Source RGB value, which is pure green, in this
case. "prgb" is the Pen RGB, or the new color, which in this case is pure
red. To find out the rgb values of the colors in the image, save it with
your browser and open it in your favorite bitmap graphics program.
Make a negative!
<IMG SRC="/cgi-bin/Count.cgi?negate=T&dd=A|df=crc1.dat">
Parameters used - df = datafile, dd = digit style, negate = invert
color
You can invert the colors in the image with the parameter
"negate=T". Note that the frame is unaffected by this command.
Transparency
If you know the hex code of a color in a digit style, you can make it
transparent. This sample makes the white color in style E
transparent.
<img src="/cgi-bin/Count.cgi?dd=E|ft=0|tr=T|trgb=ffffff">
Parameters used - dd = digit style, ft = frame thickness,
tr = make transparent, trgb = transparent color
You use the parameter "tr=T" to tell it that you want a transparent
color, and "trgb=xxxxxx" to tell it what color to transparentify. In this
case, the color white (ffffff) is used.
Make the black color of the digit style A transparent:
<img src="/cgi-bin/Count.cgi?dd=A|tr=T|trgb=000000">
Make the green color of the digit style A transparent:
<IMG SRC="/cgi-bin/Count.cgi?dd=A|tr=T|trgb=00ff00">
The Magic Invisible Counter
<img alt="" src="/cgi-bin/Count.cgi?sh=0|df=crc1.dat">
Parameters used - df = datafile, sh = show counter (no)
A hidden counter is up there. You use the "sh=0" parameter to make
your counter invisible. The ALT="" in the <IMG> tag makes it
invisible to text browsers too.
Monitoring your Counter
<img src="/cgi-bin/Count.cgi?incr=F|df=crc2.dat">
<img src="/cgi-bin/Count.cgi?incr=F|df=crc3.dat">
<img src="/cgi-bin/Count.cgi?incr=F|df=crc4.dat">
Parameters used - df = datafile, incre = display without incrementing
By using the "incr=F" parameter, you can display the counter without
incrementing it. This is useful for monitoring your hidden counters from
the web. You just put calls to the counters with the "incr=f" parameter
on a secret, unlinked html page. Then, no matter what ISP you are using,
you can monitor your counter without incrementing it.
Number of digits
You may not want six digits in your counter. You can set the number
of digits with the "md=x" parameter, where x is any number. This example
is a five digit counter.
<img src="/cgi-bin/Count.cgi?md=5|df=crc1.dat">
Parameters used - df = datafile, md = number of digits
You may also want to turn off the padding without showing commas. To
do that, you use the "pad=0" parameter. Here is a random, unpadded
counter.
<img src="/cgi-bin/Count.cgi?pad=0">
Parameters used - pad = padding size
More fake counters
You can display a string literally. The valid characters in a string
are
0123456789,:-ap
<img src="/cgi-bin/Count.cgi?lit=0123456789">
<img src="/cgi-bin/Count.cgi?dd=B&lit=0123456789">
<img src="/cgi-bin/Count.cgi?dd=C|lit=0123456789">
<img src="/cgi-bin/Count.cgi?dd=D&lit=0123456789">
<IMG
SRC="/cgi-bin/Count.cgi?ft=0&tr=1&trgb=ffffff|dd=E|lit=0123456789">
<img src="/cgi-bin/Count.cgi?lit=a1,456-:p">
Parameters used - lit = literal string
Counter can be a Clock!
You can display time in 12 hr format,
<img src="/cgi-bin/Count.cgi?display=clock">
Parameters used - display = display as
or 24 hour format.
<img src="/cgi-bin/Count.cgi?display=clock|tformat=24">
Parameters used - tformat = clock hour format
Use "display=clock" to make it a clock, and "tformat=24" to make it a
24 hour clock.
Display date
<img src="/cgi-bin/Count.cgi?display=date">
Parameters used - display = display as
Use "display=date" to show the date. With either time or date, the
frame, color, and rotation parameters still apply. Use timezone
parameter to display time or date of any place in the world.
|