PHP Visitor Counter
Date: January 10, 2007
Designed In: PHP
Mainpage: PHP Visitor Counter
Download/View: PHP Visitor Counter
Downloads/Hits: 177
Version: 1.0
Description:
Very versatile txtfile-based Visitor Counter. Original Counter (Easy Counter 1.02) by Wingnut @ www.wingnut.net.ms
Heavy modifications done with Wingnut's permission by pftq @ www.pftq.com
As with the original counter (partly quoting Wingnut here) :
Installation
Copy the counter.php, counts.txt, active.txt, and ips.txt onto your
webspace.
Make the .txt files accessible (>chmod a+rwx on all txt files) --> Normally this step can be skipped, but if you experience problems, then be sure to check.
On each page you wish to be counted (has to be a page of .php extension), add the following at the top:
<?php include("counter.php"); ?>
Stats can be viewed by entering:
<?php stat_(#); ?>
# --> Stat
0 --> Total Visitors
2 --> Visits today
4 --> Visits yesterday
6 --> Visits this month
8 --> Visits last month
For current visitors online:
<?php echo "$activenum"; ?>
For highest record of visitors online at once:
// The record number of visitors
<?php echo $activen; ?>
// The Date of the record
<?php echo $activet; ?>
MANY more settings available in the counter.php file. Open it with notepad or any other text editor and read the comments, which are shown with a // prefix.
Back to Index