This page is still under construction.
Some links are missing and not everything was tested.

Counter Script Help Page


http://www.fortunecity.com/registered/faq.cgis.html

Important! Read Fortune City FAQ on CGI-Scripts before this!


The necessity teaches wits to a man,
however stupid he might be.
EURIPIDES (480-406 BCE)


This file is based on whole the bunch of other similar help pages. I don't claim that Fortune City counter would behave as described, although I gave my best to check it. The purpose of this file is to help my neighbors in setting up counters on their pages.

Corrections and comments are welcome.

Zeljko


Counter options are used after the question mark (?) following the cgi-script URL, divided with pipe sign (|) or ampersand (&), e.g.

<IMG SRC="/user-cgi/Count.cgi?df=zheimer.004|dd=D|md=6|ft=2| frgb=black|srgb=00ff00|prgb=ff0000|chcolor=1|tr=1" HEIGHT=17 WIDTH=58 LOWSRC="dot_blck.gif">

It is my own counter source for this page, and looks like this:

The most important option is df= where you tell the script which counter you are increasing. There are rules about naming the counters - read in FC FAQ files. Important: do not use my counter file on your pages, please.

All other are optional, and are used to fine tune the look of your browser, determining the number of digits, their colors and transparency, or you can even display current time with it.

It is a good idea to give proper HEIGHT and WIDTH to your counter, so the browser could show rest of the page while it is loading. This specially goes for Fortune City counter that seems to be veeeeeery slow. (Although it is possible to compute these sizes, the best way to do so is, I believe, to make the page, test it, save the counter images and see with some image viewer their size)

Another handy thing is to define LOWSRC to point to some simple image. I have one consisting only of one black pixel. This give you a clue where your counter is when you look at the pages off line, and doesn't result with ugly broken image.

Counter options

A is character representing digit type, e.g. A, B, C, D or E.
B is boolean value that could be Y, T or 1 for yes/true/on or N, F or 0 for no/false/off.
RGB is color specification as 3 pairs of hex digits (e.g. ffffff), 3 decimal numbers between 0 and 255 (e.g. 100;128;255) or color name (e.g LightSteelGreen). See also pages by J for color names.
X are other variables described further.
Parameter Description Default
display=X X is counter,clock or date display=counter
timezone=X Only significant with display=clock or display=date. for example: timezone=GMT-0500 or timezone=GMT+0000 or timezone=GMT+0530. None.
tformat=X X is 12 or 24 for 12 or 24 hour format. tformat=12
dformat=X Only significant with display=date. For example: dformat=ddmmyy, dformat=YYMMDD. dformat=MMDDYY
ft=X Frame thickness in pixels. 0 for no frame. ft=6
frgb=R;G;B Frame color in RGB format. For example: frgb=ffffff, frgb=blue, frgb=255;255;0 frgb=100;139;216 i.e. frgb=648bd8
tr=B Transparency on/off. Use with trgb= tr=F
trgb=R;G;B Transparent color frgb=0;0;0; i.e. frgb=black
md=X Max digits; 5 <= X <= 10 md=6 Without padding
pad=B Padding with 0's on/off regarding md= setting. if not md= present pad=N
else pad=Y
dd=A Digit type A,B,C, D or E dd=A
comma=B Display comma after every 3rd digit from right. comma=F
srgb=R;G;B
prgb=R;G;B
Change source color to "pen" color. srgb=00ff00
(0;255;0 green)
prgb=00ffff
(0;255;255 cyan)
With chcolor=T
chcolor=B Change a color of the image. See srgb, prgb. chcolor=F
st=X Start counter at X (only for the first time). st=1
sh=B Show counter image (count anyway). sh=Y
df=data_file Data file name as defined by FortuneCity guidelines.
df=RANDOM returns a random number.
df=random
incr=B Increase counter (e.g. used to disable incrementation on test pages). incr=T
lit=X Display literal string. The valid values for X are 1234567890ap,:- None
negate=B Negate the color of digits. negate=F
degrees=X Rotate X degrees (90, 180, 270 and 360). degrees=270 if rotate=Y
rotate=B Rotate On/Off rotate=F

Examples:

Random digits, no frame:

<IMG SRC="/user-cgi/Count.cgi?ft=0" HEIGHT=20 WIDTH=135 LOWSRC="dot_blck.gif">


Golden frame, comma separated thousands, no increment (my home page counter status):

<IMG SRC="/user-cgi/Count.cgi?df=zheimer.001|dd=B|md=6|ft=10|frgb=gold|comma=1|incr=0" HEIGHT=40 WIDTH=50 LOWSRC="dot_blck.gif">

Because there is no padding, this will probably make problems with image size as soon as the counter reaches 100.

Such non-incrementing counter could be used for your own test page - just to see how your pages are doing and not to ruin the count with your curiosity. If you want you can see my own counter test page.


Rotated, literal string (gee, it looks like phone number :-):

<IMG SRC="/user-cgi/Count.cgi?lit=555-8787|dd=C|rotate=Y" HEIGHT=127 WIDTH=32 LOWSRC="dot_blck.gif">


Rotation could be used to make counter upside-down:

<IMG SRC="/user-cgi/Count.cgi?lit=12345678|dd=C|rotate=Y|degrees=180" HEIGHT=32 WIDTH=127 LOWSRC="dot_blck.gif">


Transparent (white) background, black digits changed to magenta:

<IMG SRC="/user-cgi/Count.cgi?dd=E|md=9|ft=0|srgb=000000|prgb=ff00ff|chcolor=1|tr=1|trgb=ffffff" HEIGHT=9 WIDTH=54 LOWSRC="dot_blck.gif">

Some "fonts" are better for making transparent then others - depending on their "color-richness". The two best are A and E.


Manipulating with HEIGHT and WIDTH tag you can get some additional effects, but be careful - this tends to give very ugly results:

<IMG SRC="/user-cgi/Count.cgi?dd=E|md=9|ft=0|srgb=000000|prgb=ff00ff|chcolor=1|tr=1|trgb=ffffff" HEIGHT=18 WIDTH=108 LOWSRC="dot_blck.gif">


Display time and date:

<IMG SRC="/user-cgi/Count.cgi?display=clock|frgb=forestgreen|ft=4" HEIGHT=24 WIDTH=122 LOWSRC="dot_blck.gif"> <IMG SRC="/user-cgi/Count.cgi?display=clock|tformat=24|frgb=lightsalmon|ft=7" HEIGHT=34 WIDTH=83 LOWSRC="dot_blck.gif"> <IMG SRC="/user-cgi/Count.cgi?display=date|dformat=YYMMDD|dd=C" HEIGHT=32 WIDTH=122 LOWSRC="dot_blck.gif">
<IMG SRC="/user-cgi/Count.cgi?display=date|frgb=lavender|ft=20|rotate=y|degrees=90" HEIGHT=152 WIDTH=60 LOWSRC="dot_blck.gif">



If you make some typos while writing the code, you would get error message from the script.
For example, if you misspell "frgb" like below, the script will tell you so. If you gave HIEGHT and WIDTH tags, you would probably have problems with reading it. Use you browser capabilities (right mouse button, View image) to see the message readable.

<IMG SRC="/user-cgi/Count.cgi?display=clock|frbg=forestgreen|ft=4" HEIGHT=24 WIDTH=122 LOWSRC="dot_blck.gif">


All "fonts" available:

<IMG SRC="/user-cgi/Count.cgi?dd=A|lit=1234567890ap,:-" HEIGHT=24 WIDTH=122 LOWSRC="dot_blck.gif">
<IMG SRC="/user-cgi/Count.cgi?dd=B|lit=1234567890ap,:-" HEIGHT=24 WIDTH=122 LOWSRC="dot_blck.gif">
<IMG SRC="/user-cgi/Count.cgi?dd=C|lit=1234567890ap,:-" HEIGHT=24 WIDTH=122 LOWSRC="dot_blck.gif">
<IMG SRC="/user-cgi/Count.cgi?dd=D|lit=1234567890ap,:-" HEIGHT=24 WIDTH=122 LOWSRC="dot_blck.gif">
<IMG SRC="/user-cgi/Count.cgi?dd=E|lit=1234567890ap,:-" HEIGHT=24 WIDTH=122 LOWSRC="dot_blck.gif">
<IMG SRC="/user-cgi/Count.cgi?dd=F|lit=1234567890ap,:-" HEIGHT=24 WIDTH=122 LOWSRC="dot_blck.gif">
<IMG SRC="/user-cgi/Count.cgi?dd=G|lit=1234567890ap,:-" HEIGHT=24 WIDTH=122 LOWSRC="dot_blck.gif">








Back to Zeljko's Residence

Copyright © 1997 by Zeljko Heimer


Under this line there are the inevitable FC banners...