The Graphical Counter (v1.1.1) generated dynamic hit counter images using the FLY graphics library, displaying visitor counts as customizable digit images.
Counter creates a graphical hit counter in-lined into your page without Server Side Includes. Unlike text-based counters, this script generates actual images showing your page hit count using customizable digit graphics.
counter.pl | Main counter program |
count.txt | Counter data file |
access_log | Visitor access log |
error_log | Error log file |
html_log.pl | HTML log formatter |
bad_referer.gif | Error image |
Counter was released on April 25, 1996 as part of Matt Wright's Script Archive. Unlike text-based counters, it used the FLY program (an interface to the GD graphics library) to generate GIF images of digit sequences on the fly. This allowed webmasters to display graphical visitor counts without Server Side Includes.
Before server-side analytics tools existed, hit counters were the primary way to measure website traffic. Visible counters also served as social proof — advertisers in the late 1990s priced ad placements based on reported page views, and a high counter number signaled an active site.
Server-side analytics (Urchin, then Google Analytics in 2005) made client-visible counters redundant. Bots and crawlers inflated counts, making the numbers unreliable, and professional web design moved away from displaying raw traffic figures.
Some websites in the 1990s initialized their counters at arbitrary high numbers (like 100,000) to appear more popular. This practice was widespread enough to become a running joke in web design circles.
Modern analytics tools replaced visible hit counters. The options below range from privacy-focused to full-featured:
Lightweight, privacy-friendly analytics. Script is 75x smaller than Google Analytics. GDPR compliant, no cookies required.
Open source, easy-to-use Google Analytics alternative. Free tier available, easy self-hosting with Docker.
Simple, privacy-first analytics. No cookies, GDPR compliant. Canadian company with strong privacy focus.
Industry standard with powerful features. Free for most sites. Requires cookie consent in EU.
Powerful open source analytics platform. Full Google Analytics feature parity. Self-hosted or cloud.
Simple, privacy-aware counter. Free for non-commercial use. Shows a visible counter if desired!
| Feature | 1996 Counter | Modern Analytics |
|---|---|---|
| Data collected | Page views only | Views, sessions, paths, events |
| User identification | IP only | Cookies or cookieless hashing |
| Real-time data | No | Yes |
| Geographic data | No | Country, city, region |
| Device info | No | Browser, OS, screen size |
| Referrer tracking | Basic | Full attribution |
| Server requirements | Perl + GD/FLY | JavaScript snippet |
| Privacy compliance | N/A | GDPR, CCPA options |
| Cost | Free (self-hosted) | Free to $50+/mo |
The FLY program provides an interface to the GD graphics library. It compiles on SunOS, OSF 3.2, and most Unix systems.
counter.pl → CGI-bin directorycount.txt → Data directory (writable)chmod 755 counter.pl
chmod 666 count.txt
chmod 666 access_log
Edit counter.pl and set paths, referer validation, and display options.
<!-- Basic usage -->
<img src="/cgi-bin/counter.pl" alt="Visitor Counter">
<!-- As background (creative use!) -->
<body background="/cgi-bin/counter.pl">
| Variable | Description | Example |
|---|---|---|
$basedir |
Base directory for counter files | /home/user/counter/ |
$count_file |
File storing the count | count.txt |
$digit_dir |
Directory with digit images | /images/digits/ |
$fly_path |
Path to FLY executable | /usr/local/bin/fly |
@referers |
Allowed referer domains | ('yourdomain.com') |
$log_access |
Enable access logging | 1 (on) or 0 (off) |
Download the Counter script package:
Common issues include:
In the 1990s, sites like GifWorks offered thousands of animated digit sets. Today you can:
Visible counters persist for several reasons:
Modern analytics tools are more practical for production use:
This script is preserved as a reference implementation.
| Feature | Counter | TextCounter |
|---|---|---|
| Output | GIF image | Plain text/SSI |
| Requirements | FLY + GD | Perl only |
| Customization | Digit images | CSS styling |
| Server load | Higher | Lower |
Simple text-based counter using SSI. No graphics library required.
Visitor logging without visible counter. Tracks detailed access info.
Let visitors leave comments on your site.
See modern analytics alternatives and implementation guides.