University of Rhode Island HomeUniversity DirectoriesUniversity Fast Linkse-CampusDepartment HelpDepartment Webmail Server
Department Home

Adding a counter to your web page.


The simple counter

A web page counter, similar to the example shown below, can be added to your web page by adding code to refer to the counter CGI program.

For example, the counter shown above was created with the following html-code.

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

You should replace username with a name appropriate for your counter. If you have more than one web page you would like to count, each refernce to the counter needs a unique name. For example. you could use username-home for your homepage, and username-resume for your resume page.

A hidden counter

It is also possible to count the number of visits to your page, without displaying a counter.

To display a hidden counter, the argument sh=0 should be passed to the counter, along with an appropriate counter name. For example:

<img src="/cgi-bin/Count.cgi?sh=0|df=username">

Monitoring counter hits

To view the hits on your counter (hidden or not) on a separate page, you would include code similar to the following:

<img src="/cgi-bin/Count.cgi?incr=F|df=username">

Note the argument incr=F which tells the counter to display the counter without incrementing it.

Frame thickness

The thickness of the frame around the counter is controlled with the ft= argument.

<img src="/cgi-bin/Count.cgi?ft=0&df=username">


<img src="/cgi-bin/Count.cgi?ft=10&df=username">


Counter Colors

The color of the counter frame can be changed by providing a frgb= argument to the counter. The color can be specified as an RGB triplet of a color name.

<img src="/cgi-bin/Count.cgi?frgb=ffd700&df=username">


The color of the counter background or counter digits can be changed with specifing a pair of srgb= and prgb= arguments. Use srgb= to tell the counter which color you would like to change, and use prgb= to select a new color. The colors specified can be given as an RGB triplet or a color name.

<img src="/cgi-bin/Count.cgi?srgb=00ff00&prgb=ffff00&df=username">


Font style

The counter has 5 different fonts styles to choose from. These can be selected with the dd= option.

<img src="/cgi-bin/Count.cgi?dd=A&df=username">


<img src="/cgi-bin/Count.cgi?dd=B&df=username">


<img src="/cgi-bin/Count.cgi?dd=C&df=username">


<img src="/cgi-bin/Count.cgi?dd=D&df=username">


<img src="/cgi-bin/Count.cgi?dd=E&df=username">


University Home
©2006 Disclaimer

Write us at: 4 East Alumni Ave, Kingston, RI 02881-0805, USA.
Phone: 401-874-2505, Fax: 401-782-6422.
Contact the department. Javascript menu by Milonic.

Page last updated: Monday, April 24, 2000