Blue Reef Technical Support Blue Reef Virtual Server Reseller ProgramInstallation instructions, manuals, how-tos, and more!About Blue Reef Consulting, Inc.

About Blue Reef Virtual ServersEcommerce Solutions for your Virtual ServerSearch the Blue Reef Virtual Server web site
Return to Blue Reef Virtual Servers Home Page
Order virtual servers, software, computers, and more!
Return to Blue Reef Main Home Page
Specials
Site Map
CGi Library of scripts to help you do business with your Virtual Serve and to have a better web site.



Blue Reef Virtual Servers
Virtual Server Support
Virtual Server Addons
CGI Library for use with a Virtual Server
CGI Library Overview
FormMail
PGP FormMail
Simple Visitor Counter
Count 2.5 Visitor Counter
Guestlist
User Information (Finger)
Password-protect files with User Authentication
URL Redirection
Tool to Check Domain Name Availability
Lookup details for domain records
Domain Record Modification Tools
Excite Search Engine for your site
SWISH-E search engine for your site
JavaScript Library
Java Library
Request help using our Problem Tracking System
Order a Blue Reef Virtual Server now!


Simple Visitor Counters

Counters, counters everywhere! It seems that the hit counter is just about as ubiquitous as the web itself! Two simple counters (one text and one graphical) are presented in three sections below.
    Note: You do not have to use a counter to track your web site's visitors. Your server logs keep an accurate record of your site visitors. To learn more about server logs, check out our special help section on site statistics.
Installation
To Install the CGI source files, telnet or SSH to your Virtual Server and enter the following:
    % cd
    % vinstall counter
Configuration
To configure the counters, do the following.
  1. Configure your Virtual Server to recognize server side includes. Create a file called .htaccess in the same directory where the HTML with the server side include is to reside. The .htaccess file should look like:

    Options Indexes FollowSymLinks Includes ExecCGI
    AddType text/x-server-parsed-html .html


    You can either use Pico to create the file on your Virtual Server or you can create it locally on your own PC (in TextPad, for example) and then use a FTP client to upload it to your Virtual Server (in ASCII mode). Either way will work.

  2. Initialize your counter with a start value. This start value allows you to start a counter at a higher number than zero so that it appears many more visitors have come to your site.

    To do this, create a file with the same "basename" as your .html file that you plan to put the counter on, but with the extension .count, rather than .html. For example, for index.html, you would create a file by the name of index.count. Put this file in the same directory as index.html.

    You can create the .count file locally on your own PC (using "notepad", for example) and then use an FTP client to upload it to your Virtual Server (in ASCII mode). Or you can do this while connected to your Virtual Server by doing the following:

      % cat > index.count 0 ^D (the control-D character)
Implementation
Include something like the following in the main body of your HTML document:
    (textual counter)
    <!--#exec cgi="/cgi-bin/library/counter/c4.pl"-->
    (graphical counter)
    <!--#exec cgi="/cgi-bin/library/counter/c4g.pl"--> 
Reload your web page and see if it works. Once you have completed the installation successfully, you will have a working counter like the one shown below.

Over    Internet Customers Served.


You have the flexibility of specifying a Graphical Counter Digit Set to be used to display the count if you are using the graphical counter. Refer to the instructions within the counter code itself for more information.

Documentation
The textual based counter, c4.pl, is written by Jonathan Lewis. The graphical based counter, c4g.pl, is simply a modification of the textual counter- modifications were made by Scott Pierce.

If you are unfamiliar with the CGI standard, or would like to learn more about the Common Gateway Interface, the following URL is an excellent resource:
SEE ALSO:

Installing CGI Scripts

CGI Security Issues

CGI Scriptorium

Server Side Includes

About Perl

Perl Modules

Configuring Virtual Subhosts

Recommended Server Books

BOOKS TO HELP YOU:

CGI Programming 101
CGI Programming 101

$24.95

CGI Programming With Perl
CGI Programming With Perl

$26.36

Apache: Web Server Directives Guidebook
Apache:
Web Server Directives Guidebook

$15.95

Apache : The Definitive Guide
Apache:
The Definitive Guide (2nd edition)

$27.96

Professioanl Apache
Professional Apache
$39.99

Amazon.com logo
Search for :
Enter keywords...