Skip to content

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

Notifications You must be signed in to change notification settings

joshin42/awstats_extractor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%