Lire::WWW::UserAgent(3pm)

Lire::WWW::UserAgent3pm

Detect browser, operating system and more from the user agent string

Usage

 use Lire::WWW::UserAgent;
 my $test_string = "Mozilla/5.0 (compatible; Konqueror/2.1.2; X11)";
 my $analyzer = new Lire::WWW::UserAgent();
 $analyzer->setUserAgent($test_string);
 print " Operating System      : " . $analyzer->getOS() . "\n";
 print " Browser               : " . $analyzer->getBrowser() . "\n";
 print "   using GUI language  : " . $analyzer->getLanguage() . "\n";
 print "   (opt) Web Robot name: " . $analyzer->getRobot() . "\n";
 %customBrowserHash = ("CustomWebBrowser" => "Custom Web Browser 2005");
 $analyzer->addBrowserHash(%testhash);
 $analyzer->addBrowser("LastMinuteBrowser", "Lastest Released LM Browser");

Overview

This module offers an interface to databases with known browsers, operating systems and other information useful in analyzing user agent strings as found in Apache combined logfiles.

Optionally, the user can add custom information to the database with the addX() and addXHash() functions, where X is the type of database.

This module is based on ideas as seen in AWStats.

Version

$Id: UserAgent.pm,v 1.8 2002/01/19 18:20:05 vanbaal Exp $

Authors

Egon Willighagen <[email protected]> and Francis Lacoste <[email protected]>

From lire 20020214-7 in Debian 3.0 (Woody). Parsed by carta from the page's man source.