Vintners.net: Page counter
At this time we have a single text-based counter on the system (directions on using it follow). If you want a nifty graphic odometer type, it's just a matter of finding one on the web, there are several decent free ones. If you find one you like, email me the URL and I'll look into it.
It's really easy to add a counter, there are two steps:
If on a Unix box, renaming to .shtml works, or you can simply add
the following to your
AddHandler server-parsed .htmlWe'd prefer that you don't do this if your site has a notable size as it is much more work intensive for the server.
[Uses since 19-Oct-95: <!--#exec cgi="/cgi-bin/counter.pl"-->] ^ ----- this part is the magic ----- ^
Once started it just counts up once every time anyone fetches the page. You cannot change this value, it's kept in a system area -- this is to prevent "cheating" -- artificially inflating the number of visitors. Once you've gotten your page set up and tested, if you wish to have it restarted from zero, it can be changed by an administrator if necessary.
You won't be able to test this on your local machine as your web browser won't know how to run the script. When testing on your machine, the page should come up just fine, except that where the counter will show up on our main server will either be a terse error msg, or perhaps it'll just be blank. When you upload it though, it'll work fine.
How it works:
Whenever the page is loaded through the web server, the server gets the file, sees that it's name ends in ".shtml", so it actually reads the page instead of just handing it over to the visitor.
As it reads through, it looks for less-than/greater-than pairs. When it finds the notation: <!--#exec ...> or: <!--#include ...> it does soemthing special. In the case of 'exec', it runs a script whose name follows and inserts the text output by the script. In the case of 'include', it simply inserts the text of the file name following.
Lemme know if you have problems with it. Contact us.
Page last updated: 19-Feb-1999
Counter test: 525