Theta Homeroom How-to:
Add a Counter to your Web Page

The cuip server has a program that will keep track of the number of visitors to your web page. Here's how to use it.

Step 1
Your web page's file name must end with the extention .php (not .html or .htm). This might entail going back and renaming a bunch of links within your web site.

 

Step 2
In your web page, put the cursor at the point at which you want to add the counter, switch to code view, and add the following text: (you can copy and paste this)

The current time is <?=date("F d, Y, g:i a, T.")?>
This page was last updated at <?=date( "g:i a o\\n F d, Y",getlastmod() )?>
by yourName.
It has had
<? include("/pub/phphitman/config.inc.php"); include("$hitmandir/hitcount.php");?>
visitors.

Replace the red text with your name or initials.

 

Step 3
Switch back to design view. You should see something like this:

 

Step 4
Save your web page and upload it to the cuip server. Visit the page a few times and check that the counter number increases.

 

The contents of the Web Institute for Teachers website are Copyright 1999-2003, University of Chicago. No one may print, copy, or otherwise reproduce these materials without the express written permission of the Director of the Web Institute for Teachers.
The current time is August 21, 2008, 3:49 pm, CDT. This page was last updated at 9:45 am 2003n July 29, 2003 , by meb. It has had 358628 visitors.
Please use the Feedback button to tell us how you like this page.