##############################################################################
#                          Text Counter v1.3                                 #
#                      Text-Based Page Counter                               #
#                                                                            #
#                         Scripts Archive                                    #
#                    https://worldwidemart.com/scripts/                      #
##############################################################################

DESCRIPTION
-----------
Text Counter is a lightweight alternative to graphical counters. It outputs
plain text numbers instead of images, making it faster and easier to style.

FEATURES
--------
* Plain text output (easy to style with CSS)
* Zero-padding option
* Thousands separator (commas)
* Unique visitor tracking
* File locking for accuracy
* Prefix/suffix text support

REQUIREMENTS
------------
* Unix-based web server with CGI support
* Perl 5.x or higher
* Fcntl module (usually included)

PACKAGE CONTENTS
----------------
textcounter.pl  - Main counter script
count.txt       - Count storage file (created automatically)
README          - This documentation

INSTALLATION
------------
1. Upload textcounter.pl to your cgi-bin directory
2. Set permissions: chmod 755 textcounter.pl
3. Create count.txt: echo "0" > count.txt
4. Set permissions: chmod 666 count.txt
5. Edit configuration variables as needed
6. Add to your page using SSI

USAGE EXAMPLES
--------------
Basic usage with SSI:
  You are visitor number <!--#include virtual="/cgi-bin/textcounter.pl" -->

Style with CSS:
  <style>
    .counter { font-family: monospace; font-size: 24px; color: #ff6600; }
  </style>
  <span class="counter"><!--#include virtual="/cgi-bin/textcounter.pl" --></span>

CONFIGURATION OPTIONS
---------------------
$count_file    - File path to store count
$start_count   - Starting number (default: 0)
$pad_length    - Minimum digits, zero-padded (default: 6)
$show_commas   - Add commas to large numbers (default: 0)
$prefix        - Text before the count
$suffix        - Text after the count
$count_unique  - Only count unique IPs (default: 0)

COMPARISON WITH GRAPHICAL COUNTER
---------------------------------
Text Counter advantages:
+ Faster loading (no images)
+ Easier to style with CSS
+ Smaller file size
+ Works without digit images

Graphical Counter advantages:
+ More visually distinctive
+ Retro aesthetic
+ Multiple styles available

MODERN ALTERNATIVES
-------------------
For modern visitor counting:

Analytics services:
* Google Analytics (https://analytics.google.com)
* Plausible Analytics (https://plausible.io) - privacy-focused
* Fathom (https://usefathom.com) - privacy-focused
* Matomo (https://matomo.org) - self-hosted option

Server-side counters:
* Redis INCR command
* Database counter tables
* Serverless functions with KV storage

Client-side (for demos only):
* localStorage counters
* IndexedDB storage

LICENSE
-------
Artistic License

##############################################################################
