Usage Information for Page Counter Display


XCOUNT.CMD is a REXX CGI script which yields a counter image showing the number of accesses attributable to a page. The image file returned has the internet media type of image/x-bitmap.

This is an XCOUNT display:


Required Parameters:

The script accepts a token as a parameter via the request URL. That token is used to track access counts. The token provided must be the URL-based path & filename of the page that the command is being called from.

The following example tracks access counts for the token "/BSM/brian.html":

Proper Usage:

	<IMG SRC="/cgi-bin/xcount.cmd?/BSM/brian.html">
Improper Usage:
	<IMG SRC="/cgi-bin/xcount.cmd?/http://w3.ag.uiuc.edu/BSM/brian.html/">

Exceptions:

The only exception to the path & filename rule is with the default page for a directory (usually "index.html"). In this case, the token should represent the directory, instead of the directory & file name. In this way the count is incremented whether the page is requested by the directory, or by index.html.

The following is an example of a proper default page counter for the directory "BSM":

	<IMG SRC="/cgi-bin/xcount.cmd?/BSM/">
Optional Parameters:

The first optional parameter selects the text / background colors.

The second, optional parameter selects number of numerical positions in the "odometer" image.
(Valid numbers are > 1. Positions will be added automatically as necessary.)

Parameters must be separated in the URL with "+" characters, which represent spaces in the URL-encoding scheme.

An example with all optional parameters:

	<IMG SRC="/cgi-bin/xcount.cmd?/BSM/counter.html+1+5"> 

On Using Alternative Tracking Files:

The script keeps its tracking file in the directory specified by the CGI environment variable PATH_TRANSLATED. Therefore, adding a path immediately before the "?", after the "XCOUNT.CMD", will cause the xcount function to use the tracking file in that directory instead of the default file in the server's root directory.

An example showing use of an alternate tracking file:

	<IMG SRC="/cgi-bin/xcount.cmd/BSM/?/BSM/counter.html+1+5"> 

Suggestions, corrections and additions to: meyer@larch.ag.uiuc.edu