#136 Plugin & Patch to call WURFL for mobile phone lookup


There is an entire sourceforge community called wurfl which is feverishly detailing the capabilities of every wireless handset by useragent.

This awstats.pl patch and plugin enables awstats to call the tera wurfl for very accurate mobile handset tracking (http://www.tera-wurfl.com) as an alternate to the inbuilt browsers.pm

Attached is a patch file which contains:

  • cgi-bin/awstats.pl.wurfl_patch
  • cgi-bin/lib/browsers.pm.wurfl_patch
  • cgi-bin/plugins/ua_lookup_wurfl.pm
  • cgi-bin/awstats.conf.patch
    and also
  • icon/browser/rim.png
  • cgi-bin/lang/awstats-en.txt.wurfl_patch

Here is the detail of what is contained:

- cgi-bin/awstats.pl.wurfl_patch
This patch calls out to tera_wurfl if the plugin is enabled in the conf file. The patch does it's best to favour awstats' logic where possible and only fall to wurfl for definite handsets

  • cgi-bin/lib/browsers.pm.wurfl_patch
    In order for this patch to work we need to remove the device matching capabilities of awstats for mobile phones as we prefer to trust wurfl for that.

  • cgi-bin/plugins/ua_lookup_wurfl.pm
    The core plugin which looks up the device and some of it's key properties (such as screen size). Each device lookup is locally cached in memory to speed things up.

  • cgi-bin/awstats.conf.patch
    The config changes required to:
    Load the plugin and point it to your tera wurfl

    Add an extrasection to report on common screen sizes (other data can be captured from tera wurfl and reported as an extra section with relative simplicity)

- icon/browser/rim.png
A new icon for the blackberry range

  • cgi-bin/lang/awstats-en.txt.wurfl_patch
    Changes the word "Browsers" to "Browsers/Handsets"

I hope this helps and can be simply rolled in to the core awstats with minimum fuss!

It was donated by my employer 5th Finger who do a lot of mobile marketing activities.

Patrick Collins


  • Patrick Collins

    Patrick Collins - 2007-12-05

    Logged In: YES
    Originator: YES

    File Added: awstats.wurfl_patch.tar.gz


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks