dynamicart/ua-parser
最新稳定版本:0.2.0
Composer 安装命令:
composer require dynamicart/ua-parser
包简介
User Agent Parser
关键字:
README 文档
README
Parse any user agent string by PHP
- Detect the device (mobile|tablet|smartTV|desktop or service)
- The device contain the brand (like Samsung), and contain the phone or tablet type (like Prestigio PAP5400DUO).
- Detect visitor Operation System like Windows, Linux, OSX, Android...
- The OS info contain the OS version (like Windows NT5.1 or Android 4.2.2).
- Detect visitor Browser/Client like Chrome, Firefox, Outlook...
- The browser info contain tha browser or client version (like MSOffice 15 or Chrome 38...)
Usage
$UAP = new dynamicart\UAParser('Mozilla/5.0 (Linux; U; Android 5.0; hu-hu; LG-D855 Build/LRX21R.A1421812393) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'); $UAP->getParsedData();
or
$UAP = new dynamicart\UAParser(); $UAP->setUA('Mozilla/5.0 (Linux; U; Android 5.0; hu-hu; LG-D855 Build/LRX21R.A1421812393) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'); $UAP->getParsedData();
License
The mobile/tablet/os/browser patterns based on Mobile Detect Library 2.8.17 (http://mobiledetect.net), but this was just the start point.
The patterns are continuously grow and change.
@author: János Szentgyörgyi puttocska@gmail.com
@license: Code and contributions have 'MIT License' https://github.com/dynamicart/UAParser/blob/master/LICENSE
GitHub Repo: https://github.com/dynamicart/UAParser
What's new
@version: 0.2.0
- smartTV detection
- pattern updates
- recheck the detected device, if parsed device is 'desktop' and parsed OS is not desktopOS, then device set to 'mobile'
version: 0.1.3
- mobile & tablet patterns updated,
- mobile patterns are sorted,
- device type is fixed
Warning
This script version is very early! Don't trust in the result...
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-06