Text Counter FAQ

Frequently asked questions about the Text Counter script.

Q1: What's the difference between Text Counter and regular Counter?

Short Answer:

Text Counter displays plain text, regular Counter uses digit images.

Long Answer:

Both scripts track page hits, but display them differently:

Feature Text Counter Regular Counter
Display Plain text numbers Graphical digit images
Speed Faster Slower (loads images)
Setup Simple (no images) Requires digit images
Styling CSS/HTML Limited to image design
File Size Tiny Larger (includes images)

Q2: The counter shows 0 or doesn't increment.

Short Answer:

Check file permissions.

Long Answer:

This is usually a permissions problem. The script needs to read and write the data file:

Test Steps:
  1. Create a test data file: echo "0" > count.dat
  2. Set permissions: chmod 666 count.dat
  3. Reload your page
  4. Counter should increment to 1

Q3: Can I add commas to separate thousands?

Short Answer:

Yes, enable comma formatting.

Long Answer:

The Text Counter can format large numbers with commas for readability:

Enable Commas:
$use_commas = 1;  # Enable comma formatting

# Without commas: 1234567
# With commas:    1,234,567
Without Commas:
  • 1234
  • 56789
  • 1234567
With Commas:
  • 1,234
  • 56,789
  • 1,234,567

Q4: How do I change the text style or color?

Short Answer:

Use HTML/CSS styling in the script output.

Long Answer:

The Text Counter outputs plain text, which you can style using HTML and CSS:

Method 1: Add HTML in Script
print "<font color='red' size='5'><b>$count</b></font>";
Method 2: Wrap with CSS (Recommended)
<span class="counter"><!--#include virtual="/cgi-bin/textcounter.cgi"--></span>

<style>
.counter {
    font-size: 24px;
    font-weight: bold;
    color: #ff0000;
    font-family: 'Courier New', monospace;
}
</style>

Related FAQs

Counter FAQ

Questions about graphical counters

Text Clock FAQ

Questions about text clocks

All FAQs

Browse all script FAQs