exo : code : apache_referers

A simple little Perl script to grab the last n hours worth of referers from an Apache log file. It can then spit out a plain list or run the information through a Template Toolkit template.

It works thus: apache_referers [-t template] logfile and then either the results of template processing or a plain list of referers are spat out to standard out. There's a few config options you can edit near the top of the script. Ultimate user friendliness wasn't the goal.

Requirements

The following Perl modules are required:

Caveats

I'd not run it on large log files as I didn't really worry that much about efficiency when I was writing it. It might be fine but I've not got any large files to run it over and it works fine for my purposes.

Download

apache_referers.tar.gz which includes a sample template.

And yes, referers is spelt that way in relation to HTTP. It might be wrong in every other context but who am I to argue.

all the usual copyright stuff... [ copyright struan donald 2002 - present ], plus license