Main >> Hobbies & Interests >> Internet

 
Description of /cgi-bin/counter

AOL /cgi-bin/counter Feature

Last updated: December 18, 1998

Table of Contents

  1. Description
  2. Setting It Up
  3. Details & Suggestions
  4. Frequently Asked Questions


Description

The counter feature allows you to count the number of times people access your web site.  By adding a simple HTML statement to your web page, the members.aol.com servers will count each retrieval of your page and display the total number of hits to those reading your page.


Setting It Up

Add the following statement to your page:

<img src="/cgi-bin/counter?screenname">

Replace screenname with your AOL screen name.


Details & Suggestions

  • See http://members.aol.com/wwwadmin/counter/example.htm for an example.
  • The counter program uses the file members.aol.com/screenname/.odometer as its memory.  Deleting this file will restart the counter.  Again, substitute the appropriate AOL screen name for screenname here.
  • The screenname of the counter and web page should be the same.
  • Web pages that use this counter feature must be hosted by AOL.
  • The available options are summarized in the table below.  Options are specified using option=value syntax and multiple options are separated by an ampersand (&).  For example,

    img src="/cgi-bin/counter?name=abc&font=57chevy"

    is a counter for member with screenname "abc".  The counter is displayed with the "57chevy" font.

  • Do not include spaces in the URL.  For example,

    img src="/cgi-bin/counter?name=abc/page 1 &font=57chevy"

    is bad.  It should be changed to

    img src="/cgi-bin/counter?name=abc/page1&font=57chevy"

    which is good.

Options
Option Value Example Description
name   name=screenname This is the name of the counter.  As demonstrated in "Setting It Up" above, an initial parameter without an option name is an alternate method of specifying the counter name.  The name should begin with your screenname.  See the frequently asked questions below to find out how to use multiple counters.
font See the table below. font=emboss Choose a counter font from the Counter Fonts table below.  If this option is not specified, the default font is used.
increment no increment=no Setting increment=no allows your counter to be displayed without changing the stored counter value.


  • The creators of these counter fonts have kindly agreed to allow us to use their fonts on members.aol.com.  The font creators do not work for AOL and they are not prepared to handle questions about our counter feature.  Please do not contact them to help you set up your counter.  If you need help, please consult the sources of AOL help listed on the WWWAdmin Home Page.

Counter Fonts
Font Appearance Width Height Creator
default

68 20  
57chevy

160 27 John Driedger
colorbl

192 24 Hiroaki Kurokawa
jcolorb

192 24 Hiroaki Kurokawa
emboss

160 24 Scott Remen
invisible

1 1  
sbg

192 30 Russ Walsh

  • All counters (except invisible) are displayed with 8 digits.  For example, a value of 72546 will be displayed as 00072546.  The widths given in the above table specify the number of pixels required for these 8 digits.
  • The gd gif-manipulating library is used in the implementation of cgi-bin/counter.  Thank you Thomas Boutell and the Quest Protein Database Center at Cold Spring Harbor Labs.  Please do not contact Mr. Boutell to help you set up your counter. (Post a detailed message on an Building Home Pages message board if you would like help.)


Frequently Asked Questions

Should my screenname in the counter name be my email address?

No.  This is a common problem.  If your screenname is abc use abc in the counter name.  Do not use abc@aol.com.

Can I omit the leading slash in the cgi-bin URL?

No.  This is a common problem.  If you have entered your src URL as

cgi-bin/counter?screenname

you must change it to

/cgi-bin/counter?screenname

to make it work.  The first form is a relative URL that will be incorrectly expanded to /screenname/cgi-bin/counter?screenname if your HTML document is located in the top level of your web site.

Are there any special instructions for Personal Publisher 2?

Yes, follow these steps:

  • Goto keyword PP2.
  • Pick EDIT. Pick the page you want your counter on. Pick EDIT PAGE.
  • Click on the HTML button.
  • Type in your counter tag as follows: <img src="/cgi-bin/counter?screenname">
  • Be SURE to replace the word screenname with your real screenname. If your screenname has spaces, eliminate them.
  • Hit Publish. Counters don't work in PP2's "View" mode and you will get an error saying "Unable to locate c:\cgi-bin". Just ignore that and publish. Once your page is published, visit it via your browser (hitting the reload button if needed) and your counter will work just fine.

Are there any special instructions for AOLpress?

Yes, follow these steps:

  • Open your web page.
  • Go to Tools->Show HTML.
  • Type in <img src="/cgi-bin/counter?screenname"> where you want the counter to be.
  • Click to close window and choose Apply.
  • Choose File->Save from the page window.

I've read the instructions and tried it.  I just can't get it to work.  Who can help me with my problem?

Try posting details of your problem to a Building Home Pages message board. See the WWWAdmin Home Page for additional sources of AOL help.

I would like to put a counter on each one of my pages to see how much traffic each area is getting.  Is there a way to do this?

Yes.  After the "counter?screenname" part of the counter URL, add a "/qualifier".  For example,

<img src="/cgi-bin/counter?wwwadmin/2">

would create a second counter, stored in the /wwwadmin/.odometer.2 file, on members.aol.com.  In this example, I chose to use "2" as my qualifier but you may wish to use a name that matches the web page being tracked.

A counter file will be stored in a subdirectory if multiple slashes are used in the qualifier.  For example,

<img src="/cgi-bin/counter?wwwadmin/email/index">

will store the counter file in /wwwadmin/email/.odometer.index on members.aol.com. Note that a single directory may contain no more than 20 counters and each counter file name is restricted to 80 characters.

Can I initialize the counter value to something other than 1 or edit the value of an existing counter?

No.  We want the values to be meaningful.  Therefore, the only way to increase the value of your counter is to get people to access your page. Note that you can reset the counter to zero by removing the counter file from your directory.


You are visitor