Counters on our serverIn response to many requests by our users for an "officially-supported" counter program, we have written a small program to increment a counter each time a page is accessed. In order to do this, however, your page needs to be set to do server-side includes. What to doOnce you have set up your page(s) to have server side includes, include this server side include directive in your html file.
Each time your page is accessed, the server replaces the above directive with
a number representing the number of times that page has been accessed.
But where does this number come from?Each users' count is stored in the server's /var/tmp/counters directory, under a file name related to the file being referenced. For example, if your home page is located at ~johndoe/Html/home.html, the corresponding file in /var/tmp/counters is located in the file, johndoe-Html-home. In addition, there is also another file which lists the hosts from which your page was accessed from, using the above example, johndoe-Html-home.list. You may edit and view the contents of this file by logging in to the web server (www.eng.hawaii.edu) itself. (Although the file is not owned by you, you may edit it, thanks to Access Control Lists, a feature found in Hewlett-Packard's version of Unix. If you would like to remove a file, please notify the webmaster to have it removed.) What else does this counter program do?In addition to simply allowing a numerical counter, this program has several options which allow you to customize its output. By changing the name of the program slightly, you can change the way the output appears. Here is a list of the different versions of the same program:
Configuring some thingsBorrowing some of the configurability from the Apache server program, you can set some options to the counter. The counter's configuration file has the same name as the file with the counter in it, aside from the suffix cntr instead of html (for example, home.cntr for home.html) added things you can add to the cntr file.
|