COUNTER.EXE is a simple page counter program that will keep a count of the number of times a web page is displayed. It is located in a common directory so all users on the NT server may access it. Always start with a very simple counter and then build it up to what you want. Your first HTML piece should look like this:
This page has been
viewed
<img
src="/scripts/counter.exe?username.homepage"> times.
This will produce:
This page has been viewed
times.
Be sure that you use your username for "username". The file that keeps the count is common to all users, so there has to be some way to make the entry unique. Normally you would use your username plus the page name, but notice that you don't have to add the .htm extension.
The example above uses the default colors (white characters on black background) and the default font for the digits. To change to a transparent background with red characters, use this HTML img src line:
<img src="/scripts/counter.exe?-t0+-fFF0000+username.homepage">
which will produce:
This page has been viewed
times.
counter.exe [-f<fg clr>] [-b<bg clr> | -t<t idx] [-s<style] [-n] [-d<GIF dir>] [-w<#>] [-h] <item>
| -f<fg clr> | color to render forground in |
| -b<bg clr> | color to render background in |
| -t<t idx> | index to color which should be transparent |
| -s<style> | name of number style (#style.gif) |
| -n | no increment, just build GIF |
| -d<GIF dir> | directory where digits are located, relative to the location of the counter program |
| -w<#> | width of counter in # of digits |
| -h | hidden, builds a transparent one by one GIF |
| <item> | unique identifier for counting, normally your username plus the page name |
Using the -s<style> option you can specify a different font set. There are a few other sets in the common directory. See below for the file names to use. An example:
This site has been viewed
times.
which uses the font called "bembo" and the width option set to 6. The img src line is:
<img src="/scripts/counter.exe?-w6+-sbembo+midtown.counterpage">
Colors are specified using RRGGBB, where each pair represents a hexadecimal number. You must include all necessary zeros.
Example: FF0000 - bright
red
Example: 00FF00 - bright green
Example: 0000FF - bright blue
The default digit directory is "cntrgifs" and is relative to the location of the program. You can have your own set of digit GIFs, but the directory has to be referenced relative to our /scripts directory. Where your directory is in relation to the /scripts directory depends on if you are a dial-in customer of MIDTOWN.NET, or if we are hosting your domain name. Use the -d option then the path to your directory.
For hosted domains the proper usage is:
-d../domains/<your-domain>/<your-digit-directory>
Example: These counter
gifs are in my directory
The img src line is:
<img
src="/scripts/counter.exe?
-d../domains/midtown/support/mycounter+-smodocr+
-w6+midtown.counterpage">
Note: Don't break the line as show above. Instead enter it in one long string, letting your editor wrap around.
For dial-in customers with web pages addressed as http://midtown.net/username, the proper usage is:
-d../wwwroot/<username>/<your-digit-directory>
You can find many more GIF digit sets at http://www.digitmania.com, all will work with this program.
Below are a few sets that are in our directory now.
| File name | Digit GIFs |
|---|---|
| bembo | |
| bigwave | |
| cntdwn | |
| fdb | |
| fdr | |
| gold | |
| modocr | |
| nextgen | |
| nw | |
| odb | |
| odw | |
| pdg |
Finally, if you want to make your site look as if it's really busy, here are a couple of GIF sets that will do that:
This site has been seen by
people!
Or...
happy visitors have seen this page.