bee4/useragent-classifier
最新稳定版本:v1.0.1
Composer 安装命令:
composer require bee4/useragent-classifier
包简介
A library to work with UserAgent detection and classification
README 文档
README
This library allow to track and detect who is behind useragents :)
Installing
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`
统计信息
- 总下载量: 222
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2015-08-07