BC Logo
  .    BCINFO    .    Personal Web Server    .   Phone/Email Directory    .   Find BC   .    Agora    .
. BCINFO / Web Master's Corner  
Search
 
  BCINFO
. Web Operations
    Welcome
    Visitor Status
    Search Engine
    CGI
  --Counter Example
  --Contact Form Example
    FTP
    Development Tools
  IT
  WWW
 
 
  

Webmaster's Corner

  
 

CGI - Counter Example

This example uses a cgi script "count.cgi" to update a file. The file keeps track of the number of visitors to your site.

If you would like to display a counter on your page which shows how many times your page has been accessed, include the code below on the page where the counter should appear.

Change the phrase "username#.dat" to your username followed by a number with ".dat" as the extension. If you have a counter on several pages, add different numerals to the end of the username to make them unique.

For example, this code produces the counter below:

  
   [ Contact : Technical Credits : Top of Page ]
This version: http://www.bc.edu/webops/counter.html
Copyright © 1997-2000 The Trustees of Boston College.