To use the Delorie Counter, you must create a control file. The control file is a file in your web directory (along with all your HTML files) with a suffix of ``.cnt'' (for ``counter''). Inside this file, you define the parameters for the counter. A file can define more than one counter (each counter has a name within the file); or you can have different control files for different counters. This file is a text file. Here is an example:
# Copyright (C) 1996 DJ Delorie # <email@example.com> All rights reserved owner=delorie.com ignore=delorie.com index c=realaba f=l%06dr border= intro c=future b=border2 install c=57chevy f=%05d b=border3 anti c=katt002 f=%d b=border2 using c=surf f=%04d b=border
The following lines are allowed:
For users with dynamic IPs, you'll need to update the owner field each time you dial in to your ISP. If you don't know your host name, just try to access the counter - it will tell you who it thinks you are, and you can use FTP (or whatever) to update the control file.
For users that share an account with other users, just comment out the owner line when you're not using it (or set it to something meaningless, like "hey,there").
You may provide your own character set if you want. To do this, create a gif file in the same directory as the counter control file, with the same format as the character sets. Specify the base name of the image in your control file (i.e. for myborder.gif, specify myborder). The counter will automatically use the one in your directory if it finds it.
You may provide your own border image if you want. To do this, create a gif file in the same directory as the counter control file. Specify the base name of the image in your control file (i.e. for myborder.gif, specify myborder). The counter will automatically use the one in your directory if it finds it.
%d 54 %06d 000054 :%d: :54:Some character sets have additional fixed images that are part of the graphic. For example, the abacus set (realaba) has a left and right edge that use the characters `l' and `r', so its format would be l%06dr.
Note that it's possible to use the counter to display a time by setting the format to a string with no percent signs, like this:
format=12:34AThis, of course, is more useful as a parameter to a specific counter tag (below).
page4 charset=b52 border=glass format=%06d utime c=clock1 b=fur f=12:52A abacus c=realaba f=l%06dr border= funny r=1000 f=%05d
You may also specify a "tag" parameter here, which indicates that you should use the count from another tag. This lets you have two counters, with different character sets and borders, that share a single count for both of them:
count1 f=%06d count2 f=%05d t=count1 c=yellow
In the above example, count1 is the one that keeps the actual count, and count2 will use count1's count but its own parameters.
<img src="../foo/mycounts.cnt?page4">In addition to reading and incrementing the counters, there are three more URLs that you can use only from a browser on the ``owner'' machine: