Counter.zip comes with:
You may want to download these other styles to use. Please see the installation instructions and the usage instructions below on how and where to unzip these. Note that the LED style is already included in counter.zip.
Or, if you want to download them all, download all.zip.
Back to TOC
/cgi-bin (or /cgi-shl) <--server's CGI directory | |--counter.exe <--the CGI script |--counter.cfg <--config file | |--/doc | | | |--counter.html <--this file | |--*.gif <--images used in this file | |--counter.readme <--counter readme file | |--/digits | |--/led <--style name | |--0.gif |--1.gif |--2.gif . . .The counter also creates the file counter.dat to keep track of data and uses the file lock.od as a semaphore. Windows NT users note: Make sure the counter has read/write permissions in the /cgi-bin directory.
where the arguments are:
(* means required)
|link*||anything that doesn't contain a space||Uniquely identifies the page calling the counter. This is case-sensitive. See examples below.|
|width||0,1,2,3,4,5,6,7,8 or 9||The width of the resulting image in digits. Extra zeros will be added to the beginning. If the width is too short for the number to be displayed, it is lengthened so that all digits may be displayed. Default is 4.|
|style*||any directory name under the /digits directory, for example, led, or the reserved value simple. Should not contain spaces||Specifies the set of digits to use in constructing the final image, or
specifes the use of the simple
|ord||yes or no (must be lowercase).||If ord=yes, an ordinal number will be
|bgcolour||RRGGBB or trans||When using the simple style, specifies the background colour of
the image, or if trans is used, specifies a transparent background.
RRGGBB should be 3 2-digit hex values in one string, similar to the
<BODY BGCOLOR="RRGGBB">. This argument has no meaning when style does not equal simple. The default is 000000 (black).
|fgcolour||RRGGBB||When using the simple style, specifies the foreground colour of the image. Same format as bgcolour. The default is FFFFFF (white).|
|inc||0, 1, 2, 3, 4, or 5||Determines how much to increment the counter. Using 0 means the counter will not increment. Using a value less than 0 will result in no increment. Using a value greater than 5 will result in an increment of 5. If you are calling from a computer specified in the [No-Increment-For] section of counter.cfg, this argument has no effect.|
2To use ordinal numbers, you need to have GIFs called th.gif, st.gif, nd.gif and rd.gif in your /digits/X/ directory, where X is the style name. Only the LED style comes with these extra GIFs: you will have to create some for the other styles. If you use the simple style, you can always use ordinal numbers if you wish.
Here are some examples of using the counter. You should change /cgi-bin/ to the name of your server's CGI directory if different.
Back to TOC
S: 1) Are you using EMWACS
2) Try right-clicking on the broken-image icon and selecting "View this image as..."
P: I get an error message.
S: In your /cgi-bin directory, there should be a file called counter.err. Use a text editor to look at this file: it contains detailed information about the error.
P: The counter won't increment
S: You are using a computer that is in the [No-Increment-For] section of counter.cfg. Either change this file (see installation instructions) or change computers.
P: I get
S: Look at the "Location" field in Netscape. It should be
something like this: http://X/.... Now look at counter.cfg
and make sure that X is listed in the section [Allow-Access-To]
Also make certain that when creating links you are using Netscape 1.1 or greater! Other browsers do not supply the HTTP_REFERER information used to conrol link creation.
P: My server has been crashing regularly since I started using your counter
S: 0) Read the disclaimer.
1) If you are using WebSite, delete all the *.in and *.out files in \TEMP
2) Try using the simple style to decrease the counter's execution time.
None of those helps
3) Make sure you aren't allowing access to the whole Internet. See installation instructions.
4) counter.cfg or counter.dat may have been correupted. Delete counter.dat (all counters will go to zero) and inspect counter.cfg
5) Buy more RAM
6) Remove the counter.
7) Then it wasn't the counter: it was something else.
Back to TOC
A: Edit the counter.dat file. The format for the counter.dat file
# of links link1 hits link2 hits link3 hits . . .Look for the link that you use for that page, and edit the corresponding hits entry. Be careful! There should only be one space between the link name and the number. Also, if you manually add or delete links, make sure that the first line accurately reflects the number of links there are, and that there are no gaps between lines.
Q: How do I create my own styles?
A: Simply create 10 GIFs, one for each digit. They must all be the same size. Save them as \digits\X\0.gif, \digits\X\1.gif, etc. where X is the style name you want to use (except for simple). Style names may not have spaces, and are limited to 64 characters. You may use transparent GIFs as long as the transparent colour is the same in all 10 GIFs. If you want to use ordinal numbers with this style, you must also create files \digits\X\th.gif, \digits\X\st.gif, \digits\X\nd.gif, and \digits\X\rd.gif. They must be the same size as the digits and should say, respectively, "th", "st", "nd", and "rd".
Q: How can I keep track of hits without having a visible counter?
A: Not sure why people want to do this, but anyway:
In your <img src="...">, put height=1 width=1.
Q: How can I get my web page to load faster when I'm using a counter?
A: You should specify the height and width of the image. Each digit in these style are 15x20, so width = 15*(# of digits displayed) and height = 20. Now put this in your HTML: <img height=20 width=X src="/cgi-bin/...">
Q: I'm using the simple style, but I can't change the background/foreground colour?
A: 1) Did you spell bgcolour and fgcolour correctly? (Americans note the U).
2) If it uses the default colour (black for background, white for foreground) then you didn't specify 3 two-digit hex numbers. Remember that it goes RRGGBB (Red, Green, Blue).
Q: How accurate is the counter?
A: The counter increments everytime it is loaded. It is not loaded when:
Back to TOC
Back to TOC