vr51 / really-simple-traffic-logger Goto Github PK
View Code? Open in Web Editor NEWVery basic PHP website traffic logger.
License: GNU General Public License v2.0
Very basic PHP website traffic logger.
License: GNU General Public License v2.0
ABOUT Full information about this script and full usage instructions along with updated script versions are available at https://journalxtra.com/web-development/php/really-simple-traffic-logger/ INSTRUCTIONS 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'. Next.. 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'); ?> COUNTER STYLING 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". NEED HELP? Visit me at JournalXtra. This script's home is at https://journalxtra.com/web-development/php/really-simple-traffic-logger/ 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. Regards, Lee Hodson http://journalxtra.com http://vizred.com
The counter may be displayed or not. See the configs below.?
i open stl.php and nothing ?
I recently experienced partial data loss on my server and couldn't pull data from a backup so I had to reinstall really simple traffic logger. I reinstalled from scratch and I'm getting this from files not in root
[15-Jan-2019 18:17:03 UTC] PHP Warning: file_put_contents(stats/data/access_log.csv): failed to open stream: No such file or directory in /public_html/example.com/stats/stl.php on line 226
[15-Jan-2019 18:17:03 UTC] PHP Warning: file(stats/data/access_log.csv): failed to open stream: No such file or directory in /public_html/example.com/stats/stl.php on line 233
[15-Jan-2019 18:17:03 UTC] PHP Warning: file_put_contents(stats/data/tally.txt): failed to open stream: No such file or directory in /public_html/example.com/stats/stl.php on line 234
[15-Jan-2019 18:17:03 UTC] PHP Warning: file_get_contents(stats/data/access_log.csv): failed to open stream: No such file or directory in /public_html/example.com/stats/stl.php on line 235
[15-Jan-2019 18:17:03 UTC] PHP Warning: file_put_contents(stats/data/cy_archive[2019-01-15].csv): failed to open stream: No such file or directory in /public_html/example.com/stats/stl.php on line 236
[15-Jan-2019 18:17:03 UTC] PHP Warning: file_put_contents(stats/data/cy_archive[2019-01-15].csv): failed to open stream: No such file or directory in /public_html/example.com/stats/stl.php on line 237
[15-Jan-2019 18:17:03 UTC] PHP Warning: file_put_contents(stats/data/access_log.csv): failed to open stream: No such file or directory in /public_html/example.com/stats/stl.php on line 238
[15-Jan-2019 18:17:03 UTC] PHP Warning: file_put_contents(stats/data/access_log.csv): failed to open stream: No such file or directory in /public_html/example.com/stats/stl.php on line 241
[15-Jan-2019 18:17:03 UTC] PHP Warning: file(stats/data/access_log.csv): failed to open stream: No such file or directory in /public_html/example.com/stats/stl.php on line 270
I've gone as far as to include like so which hasn't made a difference. From the error message above, I didn't think it would since it seems the server is hitting stats/stl.php, but just in case... :
<?php
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
include "$root/stats/stl.php";
?>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.