NAME
WWW::UserAgent - detect browser, operating system and more from the user agent string
SYNOPSIS
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");
DESCRIPTION
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 $
COPYRIGHT
Copyright (C) 2001 Stichting LogReport Foundation [email protected]
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html or write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
AUTHORS
Egon Willighagen <[email protected]> and Francis Lacoste <[email protected]>