Like many counters, the Roman Numeral Counter keeps track of how many people have viewed a given web page. This one counts in Roman numerals instead of the typical Arabic numbers. Because both Perl and the Unix operating system perform all native computations in this mathematical system, the Roman numeral counter executes eighty to ninety percent faster than others. Well, maybe not. This script should be pretty easy to set up if you've successfully installed an SSI on your page before.
View the Code (roman.cgi)
Download the Code and Instructions (roman.zip)
This script requires a web page that support server side includes and a provider which allows you to write your own CGI scripts.
If you don't have such a web page, they are available for a few dollars per month from hundreds of companies. A couple favorites are Illumanti Online and Pair Networks.
Either download the roman.zip file with everything, or download the script directly as roman.cgi. If you download the text version, rename it to roman.cgi at some point. Treat the script as straight ASCII text for downloading and editing.
This script has one variable. The variable points to a writable directory that holds your counter data:$directory = "/usr/www/users/xav/counters";
After setting this variable, make sure the script is executable and the directory is writable:chmod 755 roman.cgi chmod 777 counters
To include a counter on each page, add the following HTML code:<FONT FACE="arial"> <B>You are visitor number <!--#exec cgi="roman.cgi" --> .</B> </FONT>
You may have to name your files index.shtml instead of index.html. You may have to make the HTML files executable with chmod 755 *.html or chmod 755 *.shtml. You may have to talk to your provider to find out whether SSI is supported on your system.
This script has been designed for easy installation and troubleshooting. There are a finite number of ways that the script can fail, and the more common are addressed here.
If the count is not appearing, choose "View Source" and see whether your SSI tag is present. If so, that means your server is not supporting SSI. There are a few ways to turn it on - talk to your administrator.
If the words [An error occurred while processing this directive] appear, check your SSI tag. The path to the CGI should be equivalent to what you would use for a relative link. For example:If all else fails, go to the URL of the roman.cgi script itself. If you see a "directory invalid" message, then your variable must be changed. If you see a "Document variable not supported" message, that's normal. That's okay.Script is at http://www.provider.com/~user/cgi-bin/roman.cgi SSI Call is <!--#exec cgi="/~user/cgi-bin/roman.cgi" --> Script is at http://www.provider.com/roman.cgi SSI Call is <!--#exec cgi="/roman.cgi" -->
If you see a 500: Internal Server Error, try to transfer the file as ASCII text or run perl -w roman.cgi to find out where the problem is.
If you see a 403: Permission Denied Error, try changing permissions to executable for all (chmod 755 roman.cgi).
If you see the "Document variable not supported" message on the web page in place of the count, then you are probably not on an Apache server and this script won't work.
If you see the "Directory Invalid" message on the web page in place of the count, then double-check your directory variable.
The Roman Numeral Counter is strict freeware - it is distributed free, and cannot be resold in any way. You cannot charge for hosting or installing this script. If you typically charge a residual fee to your clients for hosting and maintaining their pages, you must communicate to them that the counter script is not included in any fee and is hosted/maintained/installed free.
Distribution of all scripts requires consent of Fluid Dynamics. To receive notification via email when an updated version is released, send an email message to noc@xav.com to that effect. To help drive new updates, please send any suggestions and bug reports to the same address.
This script is basically a scaled-down version of Matt Wright's text counter, with most of the advanced features stripped out. Thanks Matt.
[ Email | Search | Main Page | CGI Scripts | Roman Numeral Counter ] | © 1997, Fluid Dynamics |