CGI Scripting

Using the Counter Script

In order to have a counter on your Web site, you need to use a script. EarthLink provides a script you can use for this purpose called counter.pl. There are several formatting options from which to choose. Since there is only one data file that holds the value of the counter per Web site, only one counter should be displayed per site.

Description Code
Plain <img src="http://home.earthlink.net/cgi-bin/counter.pl?">
Plain + Padding (with zeros) <img src="http://home.earthlink.net/cgi-bin/counter.pl?zero">
Inverse (reverse video) <img src="http://home.earthlink.net/cgi-bin/counter.pl?inverse">
Inverse + Padding <img src="http://home.earthlink.net/cgi-bin/counter.pl?zero+inverse">

Simply add the corresponding code to the type of counter you want to display on your Web site.

Example

Number of visits: <img src="http://home.earthlink.net/cgi-bin/counter.pl">

If the background is black (or very dark) and the coding on the page is correct, the counter is displaying black on black. To overcome this, put the IMG tag for the counter into a cell in a table with a light background. Here is a piece of sample code:
<!--begin sample HTML code for Counter-in-a-Table-->
<p>
<center>
<table align="center">
<tr>
<td align="right" width=
210>You are visitor number
</td>
<td bgcolor="#ffffff" width=
120>
<img src="http://home.earthlink.net/cgi-bin/counter.pl?inverse">
</td>
</tr>
</table>
</center>
</p>
<!-- end sample HTML code for Counter-in-a-Table-->
Adjust the width values (shown in red) to suit your page.


Member Web Support Main Menu