Last Updated: January 20, 2000
Counters, counters everywhere! It seems that the web counter is just about a ubiquitous as the web itself! Two simple counters (one text and one graphical) are presented in three sections below.
The HTML source below represents a the server side include necessary to call either the textual or graphical counter CGI.
<!--#exec cgi="/cgi-bin/library/counter/c4.pl" --> (textual) or <!--#exec cgi="/cgi-bin/library/counter/c4g.pl" --> (graphical)
In order for Server Side Includes to work, they must be allowed to execute. This can be done globally with the server configuration files or locally with a file named ".htaccess" (assuming typical installation of NCSA httpd applies). A ".htaccess" file overrides global server configuration for the directory in which it resides. An example of a ".htaccess" file is shown below:
Options Indexes FollowSymLinks Includes ExecCGI AddType text/x-server-parsed-html .html
The textual based counter is written by Jonathan Lewis. The graphical based counter is simply a modification of the textual counter- modifications were made by Scott Pierce.
If you are unfamiliar with the CGI standard, or would like to learn more about the Common Gateway Interface, the following URL is an excellent resource:
http://hoohoo.ncsa.uiuc.edu/cgi/
If you are an A Little Technology Shoppe, LLC customer
If you are not an A Little Technology Shoppe
customer (sign up!)
Options Indexes FollowSymLinks Includes ExecCGI
AddType text/x-server-parsed-html .html
% cat > index.count
0
^D (the control-D character)
<!--#exec cgi="/cgi-bin/library/counter/c4.pl" -->
or for a graphical counter:
<!--#exec cgi="/cgi-bin/library/counter/c4g.pl" -->
With graphical counters, you have the flexibility of specifying a
graphical digit set to be used
to display the count. Refer to the instructions at the top of the
c4g.pl source file for more
information.
Copyright © 1996, 1997 Last Modified: 20 January 2000. A Little Technology Shoppe, LLC. All rights reserved. All brand names and product names used on these web pages are trademarks, or trade names of their respective holders.