sgrodzicki/phpbrowscap
Composer 安装命令:
composer require sgrodzicki/phpbrowscap
包简介
Standalone replacement for php's native get_browser() function
README 文档
README
Hacking around with PHP to have a better solution than get_browser()
Introduction
The browscap.ini file is a database maintained by Gary Keith which provides a lot of details about browsers and their capabilities, such as name, versions, Javascript support and so on.
PHP's native get_browser() function parses this
file and provides you with a complete set of information about every browser's
details, But it requires the path to the browscap.ini file to be specified in
the php.ini browscap
directive which is flagged as PHP_INI_SYSTEM.
Since in most shared hosting environments you have not access to the php.ini file, the browscap directive cannot be modified and you are stuck with either and outdated database or without browscap support at all.
Browscap is a standalone class for PHP >=5.3 that gets around the limitations of
get_browser() and manages the whole thing.
It offers methods to update, cache, adapt and get details about every supplied
user agent on a standalone basis.
Browscap is a Composer package.
Quick start
A quick start guide is available on the GitHub wiki, at the following address: https://github.com/GaretJax/phpbrowscap/wiki/QuickStart
Features
Here is a non-exaustive feature list of the Browscap class:
- Fast
- Standalone
- Even faster parsing many user agents
- Fully get_browser() compatible
- Often faster and more accurate than get_browser()
- Fully PHP configuration independent
- User agent auto-detection
- Returns object or array
- Parsed .ini file cached directly into PHP arrays
- Accepts any .ini file (even ASP and lite versions)
- Auto updated browscap.ini file and cache from remote server with version checking
- Configurable remote update server
- Fully configurable (since 0.2)
PHP4 andPHP >=5.3 compatible (PHP <5.3 version deprecated)- Released under the MIT License
Issues and feature requests
Please report your issues and ask for new features on the GitHub Issue Tracker at https://github.com/GaretJax/phpbrowscap/issues
Please note that the browscap class only parses and queries the browscap.ini database provided by Gary Keith. If a browser is wrongly identified or a results presents erroneous properties, please refer directly to the browscap project homepage at: http://browsers.garykeith.com/
sgrodzicki/phpbrowscap 适用场景与选型建议
sgrodzicki/phpbrowscap 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 754 次下载、GitHub Stars 达 0, 最近一次更新时间为 2012 年 11 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「browser」 「get_browser」 「capabilities」 「user agent」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sgrodzicki/phpbrowscap 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sgrodzicki/phpbrowscap 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sgrodzicki/phpbrowscap 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Standalone replacement for php's native get_browser() function
Standalone replacement for php's native get_browser() function
UserAgent parsing done right http://useragent.mkf.solutions/
Give your JS App some Backbone with Models, Views, Collections, and Events.
The standalone PHP Browscap parser Crossjoin\Browscap detects browser properties as well as device information based on the user agent string of the requesting browsers and search engines, using the data from the Browser Capabilities Project. It's several hundred times faster than the build-in PHP f
UserAgent parsing done right http://useragent.mkf.solutions/
统计信息
- 总下载量: 754
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 26
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-11-06