PHP code example of riimu / accesslogstats
1. Go to this page and download the library: Download riimu/accesslogstats library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
riimu / accesslogstats example snippets
$parser = new Riimu\LogParser\LogParser(
new Riimu\LogParser\Source\AccessLogSource('access.log'),
'output');
$report = new Riimu\LogParser\Report('Referrers for www subdomain');
$report->addFilter(new Riimu\LogParser\Filter\FilterDomain('www.example.com'));
$report->addView((new Riimu\LogParser\View\ReferrerView())
->addInternalDomain('www.example.com'));
$parser->addReport($report);
$parser->process();
$parser->saveJSON();