joshin42 / awstats_extractor

A little script that pulls data chunks out of AWStats flat files and saves them to CSV

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

awstats_extractor

This is a fairly simple PHP script which can be included in any app.

It takes a .txt file generated by AWStats and strips out the main chunks of data, spitting it back out into csv files.

Examples for running from cli and $_GET are included.

Usage

The main function can be found in core.php, but the example given in cli.php can get you using the script straight away.

First you need to locate your awstats data files. These will likely be in your awstats/wwwroot/cgi-bin folder and named something like awstats[mm][yyyy].[your-config-name].txt (obviously, replace the month, year and config names apropriately)

Run cli.php from the command line with: php cli.php path/to/data/file.

This will then generate a number of csv files in the outputs folder of the script containing the data from the various chunks of the awstats file.

About

A little script that pulls data chunks out of AWStats flat files and saves them to CSV


Languages

Language:PHP 100.0%