Academic Computing

Web Page Counters


In response to the requests made by students on Academic Computing servers, we are supporting web page counters on helios. A global counter script has been established to provide students with the ability to keep a running count of accesses to any of their web pages. This service is only being extended to students who have e-mail accounts on Academic Computing servers. Please make sure to read the help files we have provided for the counter before seeking assistance. If you do require assistance, send e-mail to www@acomp.usf.edu.

How Do I Use a Counter?


If you have seen a web page before you most likely have seen a web page counter. Usually an image, a web page counter keeps track of visits to your web page and displays them proudly on your page. A counter utilizes a CGI (Common Gateway Interface) script and is, in short, an executable program that runs as your web page is loaded. CGI is a security concern to systems administrators because it gives someone the ability to run a program or instruction on a server without authentication. Due to this fact, CGI will be strictly monitored on this system and only scripts which are safe to use will be available to users.

To use this script, simply apply the following tag to your HTML file(s):

< img src="/cgi-bin/Count.cgi?df=x.dat">

df=x.dat is where you would specify the name of your counter's data file (where the number of page accesses actually resides). Each data file must have a unique name, so to keep things simple you would name that data file with your login id followed by the name of the page. Example:

< img src="/cgi-bin/Count.cgi?df=william-index.dat">

The example above would create a data file called william-index.dat and would store all of the page accesses for your web page. Each web page you have this tag on should have a different data file name.

This is what your new web page counter looks like:

Formatting the Counter's Output
There are many options for formatting the counters appearance and behavior. In addition to the standard number counting features, this particular script can display time and date. More in-depth instructions can be found at this counter example page.

Return to Home