IPStatistics, by TuxSoft Limited, based on the app of the same name by James Phillips - released to GitHub 2017.
IPStatistics is a PHP plugin to allow website admins to monitor their analytics.
IPStatistics is a simple, database-driven PHP Analytics plugin for websites. It consists of two main scripts: Stat.php - which logs statistics when run on every page, and Analyse.php - which analyses and formats these statistics for your use.
In an aim to be as simple and efficient as possible, this plugin consists of only:
Code | Amount | Purpose |
---|---|---|
Includes (.inc) | 6 lines | To hold database login data above the web root. |
PHP | 220 lines | This is a combination of both: the mechanism that gathers analytic data, and the one that analyses it. |
- Fill in the gaps in DataBaseDetails.inc with your database login details.
- Save DataBaseDetails.inc above the web root on your server.
- Create a MySQL database and table. The table needs to contain the following SQL structure:
CREATE TABLE IPTable('ID' BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,'IP' VARCHAR(25) NOT NULL,'Date' DATE NOT NULL,Time VARCHAR(10) NOT NULL,'Month' INT(11) NOT NULL);
- Save Stat.php and Analyse.php below the web root.
- Insert the following code into each page of the site where you want to take analytics:
<?php
include("./Stat.php"); //Gather stats for analytics.
?>
- When you want to check your site analytics, simply navigate to your web address /Analyse.php.
This plugin was released on 5th August 2017 under the GNU General Public License v3.0 or later by TuxSoft Limited. See the LICENSE file for more details.