commencement.technology/botcheck
最新稳定版本:1.0.1
Composer 安装命令:
composer require commencement.technology/botcheck
包简介
The package which identify the Bot or Crawler which help to identify the how many bots or crawler visiting in day and from where
README 文档
README
Bot check parsing user agent and returns useful details of Bot, Crawler, Browser and OS information. AIM is comprehensiveness to return broad information on the bot, crawler, most common devices, browsers, hardware, etc.
* Operating System `os` * e.g. Windows, macOS, Linux * Browser `browser` * e.g. Firefox, Safari, Firefox iOS * Hardware `hardware` * e.g. Nintendo Switch, Apple iPad * Miscellaneous `misc` * e.g. Slack, WhatsApp, Gmail, cURL, Python-urllib * Bot `bot` * e.g. Googlebot, BingBot, Baidu Spider
Result Data of Bot
* Name * Website * Bot Site Complete page
Result Data General
* Name * Version * Brand (hardware only) * Model (hardware only) * Mobile (boolean, can be inaccurate)
Install / Configuring
Packagist commencement.technology/botcheck
$ composer require commencement.technology/botcheck
Usage
use CommencementTechnology\Botcheck\BotChecker; // $ua = $request->get('ua'); // OR // $ua = $_SERVER['HTTP_USER_AGENT']; $ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0'; $user_agent = new BotChecker($ua); // If you want all data in that case just use parse $user_agent_info = $user_agent->parse();
Result
[ 'os' => [ 'name' => 'Windows', 'icon' => 'win10', 'version' => '10' ], 'browser' => [ 'name' => 'Firefox', 'icon' => 'firefox', 'version' => '86.0' ], 'hardware' => false, 'misc' => false, 'bot' => false ];
// When you want only Operating system specific details pass as $user_agent_os = $user_agent->parse('os');
Result
[ 'name' => 'Windows', 'icon' => 'win10', 'version' => '10' ];
// When you want only bot or crawler specific details pass as $user_agent_os = $user_agent->parse('bot');
Result
[ 'name' => 'SEMRush Crawler', 'website' => 'http://www.semrush.com', 'complete_link' => 'http://www.semrush.com/bot.html' ];
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-11