TextCounter Readme

Installation guide for TextCounter - text-based page counter with date tracking (v1.2)

Perl v1.2 Documentation

Overview

TextCounter 1.2 allows you to include a text-based counter on any page. Features include:

  • Date since counting began
  • Link to help page
  • Multiple counters with one script
  • Host-based access control
  • Directory-based permissions
Package Contents
  1. README - Installation instructions
  2. counter.pl - The CGI/Perl program

Variable Configuration

Variable Description
$data_dir Path to data directory (must end with /). Requires chmod 777.
@valid_uri Array of allowed URI paths that can use the counter
@invalid_uri Array of URI paths that cannot use the counter

Options

Option Values Description
$show_link 1 / 0 Show link to TextCounter information page
$auto_create 1 / 0 Automatically create data files for new pages
$show_date 1 / 0 Show "since [date]" with counter
$lock_sec number Seconds to wait for file lock (0 = no locking)
$pad_size number Pad counter with zeros to this many digits (0 = no padding)

How to Call This Script

Use Server Side Includes (SSI) to embed the counter:

<!--#exec cgi="/cgi-bin/counter.pl"-->

The script automatically determines which page is calling it based on the referrer.

Related Documentation

All Readme Files

Browse all script documentation