Hit Counter - Frequently Asked Questions

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

  1. After installation, you should find the files in your /cgi-bin directory, as follows:
    /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.
  2. If you downloaded other styles, unzip them in the same way as above. New directories under the /digits directory will be created.
  3. Edit the counter.cfg file with Notepad
    • Under the [No-Increment-For] section, enter the host name and IP address of each computer that you do not want the counter to count as a visit, one per line. If you want the counter to count every visit, leave this section blank (but do not delete the [No-Increment-For] line).
    • Under the [Allow-Access-To] section, enter the host name, all aliases and IP addresses for each computer and server that you will allow to create links on your server. By this, we're talking about the machine name and IP address that we assigned you when you began your service. Unauthorized people trying to create a link will get this message instead: . If you want to allow access to everyone (an unwise decision, but...) then just put a single period in this section.
  4. Proceed to the usage instructions and use the counter on a test page to try it out. Try hitting "Reload" a couple of times to make sure it increments.
  5. If it doesn't work, read the troubleshooting information.

Usage Instructions

Now has come the time to use the counter in your HTML files. The counter is called like this in your HTML:

<img src="/cgi-bin/counter.exe?arg1=value1&arg2=value2&...&argn=valuen">

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 style 1. Should be all lower-case
ord yes or no (must be lowercase). If ord=yes, an ordinal number will be outputted 2. An ordinal number is a number like 345th, 10871st, 22nd, etc. The default is no
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.
Notes:
1The simple style looks like this: 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.

<img src="/cgi-bin/counter.exe?link=myhomepage&style=led">

<img src="/cgi-bin/counter.exe?link=page2&style=odometer&width=7">

<img src="/cgi-bin/counter.exe?link=page3&style=simple&bgcolour=00FFFF&fgcolour=FF0000">

<img src="/cgi-bin/counter.exe?link=page4&style=led&width=0&ord=yes">

<img src="/cgi-bin/counter.exe?link=anotherpage&style=simple&fgcolour=00FF88&ord=yes">

Troubleshooting

P: I get the broken-image symbol.

S:

  1. Are you using EMWACS or Purveyor?
  2. Try right-clicking on the broken-image icon and selecting "View this image as..."
    • It says "URL Not Found"
      Then either we put counter.exe in the wrong spot, or you mistyped something in your HTML. Did you remember to request installation of the Counter?
    • It asks whether or not I want to save counter.exe!?
      It asks if I want to configure a viewer for type application/octet-stream!?
      Then we haven't told the server that the /cgi-bin directory is special, that .exe files there should be executed, not downloaded. Silly us! Email us in this event.
    • It says "Server Misconfiguration"
      Email us.
    • It says something like "Can't create child process"
      Email us.
    • It says something different
      E-mail us the following information:
      • Your URL
      • The Message you do get (if any)

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:

If super accuracy is what you need, check out WebTrends.

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.