The following description explains how to add counters to your pages if your pages are on the IPA webserver. The description may be helpful elsewhere too, but don't expect the description to apply exactly to other servers.
The IPA webserver provides a counter mechanism that enables you to add counters to your pages (on that server) without having to coordinate with IPA first. If you add a counter to a page, the counter is automatically created, with a zero count. Here's the essential HTML required to place a counter in a page.
<IMG SRC="/cgi/nph-count?width=6&link=/clients/webhints/xxx.html">
This looks a bit intimidating, but let's take a look at its components. The IMG indicates the kind of tag we are dealing with: an image. The entire rest of the tag is consumed by the SRC field. The first part of that field specifies the CGI program that will be invoked to generate the image: /cgi/nph-count. The question mark separates the program specification from the arguments to the program. The first argument is width=6 which specifies that the counter is to be displayed as six digits (you can vary this). The & is an HTML escape for a true & symbol which separates the arguments. The final argument is link=/clients/ross/index.html which specifies the name of the counter.
By convention, the name of a counter should be the same as the IPA server file system path of the page on which it appears. However, it's possible to make the "link" name anything you like; it's just a name. The only restriction is that counters should always start with /clients/yourwebname/ so as to ensure that the counter namespaces of different IPA clients don't intersect.
The counter HTML code two paragraphs above turns out looking
like this:
.
You can make this bigger or smaller using the HEIGHT and
WIDTH image attributes. Each digit in a counter consists
of an image 20 pixels high and 15 pixels wide. So for a half-sized
counter, you can use:
<IMG SRC="/cgi/nph-count?width=6&link=/clients/webhints/xxx.html" HEIGHT="10" WIDTH="45">which looks like this:
A double-sized counter looks like this:
.
Other attributes can be added to improve the layout of a counter image. The HTML code I've ended up using for counters is:
<IMG SRC="/cgi/nph-count?width=6&link=/clients/webhints/xxx.html" VALIGN="center" ALIGN="absmiddle" ALT="[Page hit counter]" BORDER="0" HEIGHT="20" WIDTH="90">
Finally, it makes sense to specify the date when a counter was added to your page. This allows the reader to compute an average hit rate. The final format, using a half-sized counter, appears at the top of many http://www.ross.net/ home pages, and looks like this: