Complete installation guide for the graphical Counter script.
Version 1.1.1 | Created 10/27/95 | Last Modified 4/25/96
This counter script creates a graphical counter in-lined into your page without Server Side Includes.
This script requires the FLY program, which provides an easy interface to the GD graphics library. FLY compiles easily on SunOS, OSF 3.2, and other Unix systems.
Place this file in your cgi-bin and chmod it 755.
| Variable | Description |
|---|---|
$count_file |
Path to count.txt data file. Don't edit manually - use new_count.pl to change the number. |
$digit_dir |
Directory containing digit images (0.gif - 9.gif). All must be equal width/height. |
$access_log |
Path to access log file. Directory must be chmod 777. |
$error_log |
Path to error log file for timeouts and bad referers. |
$flyprog |
Path to the FLY program. Chmod it 755. |
$fly_temp |
Temporary file for FLY commands. |
$bad_referer_img |
URL to bad_referer.gif image. |
@referers |
Allowed server names (e.g., "host.com","www.host.com"). |
| Variable | Description |
|---|---|
$width / $height |
Width and height of each digit image in pixels. |
$tp |
Transparency color in RGB (e.g., "0,0,0" for black). Set to "X" for none. |
$il |
Interlacing: 1 = interlaced, 0 = non-interlaced. |
$frame_width |
Frame width in pixels. 0 = no frame. |
$frame_color |
Frame color in RGB (e.g., "255,255,255" for white). |
$dot |
Set to 1 to return invisible pixel (logging only). |
$logo |
URL of image to return instead of counter (logging only). |
| Variable | Description |
|---|---|
$max_time |
Maximum seconds to wait before timeout error (default: 7). |
$uselog |
1 = enable logging, 0 = disable logging. |
To start with a different number than 1, open this file and enter your starting number. The script will display this number on the next access.
Generates an HTML 3 table-formatted document of your access_log.
$web | 1 = run from web, 0 = run from command line |
$log_file | Path to access_log |
$min_remote | Minimum accesses for host to appear in list |
$min_agent | Minimum accesses for browser to appear |
$expand_agent | 0 = group by browser, 1 = show all platforms |
$show_percent | 1 = show percentages |
$title | Page title for statistics |
$title_url | URL to the page being counted |
Command line usage:
html_log.pl > stats.html
Place these files where specified in $access_log and $error_log. Both files and their directory must be chmod 777.
You'll need digit images named 0.gif through 9.gif, all with identical width and height.
After downloading, rename files to 0.gif - 9.gif and note the width/height for configuration.
Call the counter like any image:
<img src="http://www.your.host.com/cgi-bin/counter.pl">
You can even use it as a background image (though it may look tacky):
<body background="http://www.your.host.com/cgi-bin/counter.pl">