Kore Nordmann - PHP / Projects / Politics ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Author: Kore Nordmann :Date: Thu, 09 Aug 2007 13:18:55 +0200 :Revision: 6 :Copyright: CC by-sa =================== Pimp my website log =================== :Description: I pimped the output of visitors to create SVG graphs, which are far more beautiful and better readable then the standard html or text output. There are several free website log analyser out there, like `AWStats`__ , `Analog`__ , `Webalizer`__ or `Visitors`__ , but all of them have in common to generate quite ugly statistics. For this website I decided to use Visitors, because it is very easy to handle, fast and small. It can generate some interesting statistics like `web trails`__ and `combined maps`__ , which shows brighter fields for more hits on a 2D map. __ http://awstats.sourceforge.net/ __ http://www.analog.cx/ __ http://www.mrunix.net/webalizer/ __ http://www.hping.org/visitors/ __ http://www.hping.org/visitors/report.html#Web%20trails __ http://www.hping.org/visitors/report.html#Weekday-Hour%20combined%20map But the use of html for generating graphs for sure is the wrong way. We can use SVG now (ok, the users of an uptodate gecko engine can), and this results in smaller and scaleable graphs. I started hacking around two days ago and got finished with quite `impressive first results`__ (you need Mozilla Firefox 1.5 to display the SVG graphs properly) yesterday. It took me some time to find out how to draw ellipse sectors - the `RFC`__ is not very intuitive at this point. Finished with this, everything else was more or less trivial. Now you type something like this and you'll get some really beautiful SVG's: __ http://stats.kore-nordmann.de/ __ http://www.w3.org/TR/SVG11/paths.html#PathDataEllipticalArcCommands :: # visitors -G -K -U -W -M -O -B -X -Y -R -o text --trails \ # --prefix http://example.com /path/to/access.log \ # | /path/to/visitors_svg/genstat.php -t /path/to/visitors_svg \ # -c /path/to/visitors_svg /path/to/report_directory You can obtain the source of the `script here`__ . But be warned: __ http://kore-nordmann.de/home/php_code_snippets/visitors_svg - It is not really tested for now - I just played around a little bit, and it works fine for me :-) - Do not think the code for the generation of the graphs is really reuseable ;-) Trackbacks ========== Comments ======== - stelt at Wed, 08 Aug 2007 22:50:37 +0200 impressive first results = 404 - kore at Thu, 16 Aug 2007 13:06:39 +0200 Thanks for the hint. I updated the link and it works again now. - مدرسة الحرس الاميرى at Mon, 07 Jul 2008 10:23:20 +0200 google