bee4/useragent-classify

This package is abandoned and no longer maintained. The author suggests using the bee4/useragent-classifier package instead.

A library to work with UserAgent detection and classification

Maintainers

👁 shulard

Package info

github.com/bee4/useragent-classify

Issues

pkg:composer/bee4/useragent-classify

Statistics

Installs: 225

Dependents: 0

Suggesters: 0

Stars: 5

v1.0.1 2015-09-25 11:20 UTC

Requires

  • php: >=5.4
  • ext-pcre: *

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Apache-2.0 7f1d59ea7a36d15589eeda9a0e1785652a10a99a

  • Stephane HULARD <s.hulard.woop@chstudio.fr>

This package is not auto-updated.

Last update: 2022-02-01 12:43:33 UTC


README

👁 Build Status
👁 Scrutinizer Code Quality
👁 Code Coverage
👁 SensiolabInsight

👁 License

This library allow to track and detect who is behind useragents :)

Installing

👁 Latest Stable Version
👁 Total Downloads

This project can be installed using Composer. Add the following to your composer.json:

{
 "require": {
 "bee4/useragent-classifier": "~1.0"
 }
}

or run this command:

composer require bee4/useragent-classifier:~1.0

Usage

This library is composed of a Detector object and different Bots implementation.

use Bee4\UserAgent\Classifier\Detector;

$ua = 'Mozilla/5.0 (compatible; Mail.RU/2.0)';
$bot = Detector::whoIs($ua); //$bot is a Bots\MailRU instance

$bot->getBot(); //Here we get `mailru`
$bot->getName(); //Here we get `mailru-bot`

$ua = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';
$bot = Detector::whoIs($ua); //$bot is a Bots\Google instance

$bot->getBot(); //Here we get `google`
$bot->getName(); //Here we get `google-bot`