What Is A Hit Counter?
A Hit Counter is a little thing you stick on your web page that lets you quickly see how many people are visiting that page. You can put counters on as many pages as you like, so long as you tell the Counter that you're using multiple pages (so that it can keep separate statistics for each page).
The Counter displays, right on your page, the number of visitors who've visited your site since you installed the Counter. You can also reset the Counter totals for any given page. If you have a look over at the left hand side of the page, you should see a counter on the navigation bar.
I'd Like To Use It. How Do I Go About It?
Unlike some ISP's, we install a separate copy of the Hit Counter on each client site, rather than making everyone share a single copy. This lets you directly edit the configuration files (although I really don't recommend that you do), add new counter fonts, and edit the number of hits (which is particularly important if you've just moved in - you may as well set your number of hits at whatever it was at your LAST site, instead of starting again at zero).
We do not do this automatically. You must request this service by sending email to joey@garynuman.info. Once you do, we will place a copy of the Hit Counter into your CGI-BIN directory (and create that directory if it doesn't already exist) for you to use.
I've Made The Request, You've Installed The Counter. Now What?
A main feature of this counter is the ability to use many different
styles of digits. The default is some digits
that look like an LED readout - here's an example:
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 all of the styles in the following table will be installed for you.
| Style Name | Example |
|---|---|
| led | |
| odometer | |
| lcd | |
| speckled | |
| noisy | |
| cyan | |
| eggs | |
| halloween | |
| curly | |
| timex | |
| red | |
| orange | |
| chalk | |
| scoreboard | |
| neat | |
| beach | |
| electric | |
| fancy | |
| frozen | |
| handwriting | |
| oldstyle | |
| sf |
Installation Instructions
/cgi-bin <--your 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.
. If you want to allow access to
everyone (an unwise decision, but...) then just put a single
period in this section.
Usage Instructions
Now has come the time to use the counter in your HTML files. The counter is called like this in your HTML:
where the arguments are:
| Argument (* means required) |
Possible Values | Meaning |
|---|---|---|
| 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
HTML command <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. |
This style requires less disk I/O and thus (should) execute more
quickly.
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.
Examples
Here are some examples of using the counter. You should change /cgi-bin/
to the name of your server's CGI directory if different.
Troubleshooting
P: I get the broken-image symbol.
S:
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.
More Questions
Q: How can I adjust the counter ahead/backwards?
A: Edit the counter.dat file. The format for the counter.dat file
is:
# 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:
I Have A Question That Isn't On This List.
No problem. Send email to webmaster@GaryNumanFan.NU and I'll try to answer your question as best I can.