Skip to content
Very basic PHP website traffic logger.
PHP ApacheConf
Branch: master
Clone or download
Pull request Compare This branch is even with VR51:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Full information about this script and full usage instructions along with updated script versions are available at


Download and unzip the package.

The files will be unzipped into a directory called 'Really Simple Traffic Logger'. Change the directory name to just 'stats'. This directory contains the executable script called stl.php, a subdirectory called 'data' and a readme file.

Before unzipping the package on your server, please make sure there is not already a directory called 'stats'.


Decide whether you want the script to run for one set time period (Session Mode) or several time periods over an indefinite duration (Cycle Mode) then configure the CONFIGURABLE VARIABLES before calling the script into the web page/pages you wish to monitor. Use a php include to call the script into your pages, e.g

<?php include('stats/stl.php'); ?>

Adapt the path in the include so it matches the location of the counter relative to the page that calls it. For example, if you have the counter unzipped in the root directory of your server or domain name then stl.php will be installed in the directory called stats.

You would call this script from any page above the /stats directory by using the PHP include:

<?php include('stats/stl.php'); ?>


The counter may be displayed or not. See the configs below.

The default layout is as a table. The <table> ID is "simple_php_counter". The counter labels are encased in <span> tags with the class 'simple_php_counter'.

The counter may be styled with CSS or completely changed by other html components.

The table is toward the bottom of this page between the tags "START COUNTER DISPLAY" and "END COUNTER DISPLAY".


Visit me at JournalXtra.

This script's home is at

I will help as much as I can.

If you wish to, you may lighten the script by removing comments and everything between this line and "ABOUT" (above). The license must remain.


Lee Hodson
You can’t perform that action at this time.