承接 udger/udger-php-v4 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

udger/udger-php-v4

最新稳定版本:4.0.3

Composer 安装命令:

composer require udger/udger-php-v4

包简介

PHP agent string parser based on Udger https://udger.com/products/local_parser

README 文档

README

Local parser is very fast and accurate useragent string detection solution. Enables developers to locally install and integrate a highly-scalable product. We provide the detection of the devices (personal computer, tablet, Smart TV, Game console etc.), operating system, client SW type (browser, e-mail client etc.) and devices market name (example: Sony Xperia Tablet S, Nokia Lumia 820 etc.). It also provides information about IP addresses (Public proxies, VPN services, Tor exit nodes, Fake crawlers, Web scrapers, Datacenter name .. etc.)

  • Tested with more the 1.000.000 unique user agents.
  • Processes Google User-Agent Client Hints
  • Up to date data provided by https://udger.com/

Requirements

Features

  • Fast
  • LRU cache
  • Released under the MIT

Install

composer require udger/udger-php-v4

Usage

You should review the included examples (parseUA-IP.php, parseSec-Ch.php ... etc)

Here's a quick example:

$factory = new Udger\ParserFactory(sys_get_temp_dir() . "/udgercache/udgerdb_v4.dat");
$parser = $factory->getParser();

// enable/disable LRU cache
$parser->setCacheEnable(false); // default is enable
//$parser->setCacheSize(4000);  // default size is 3000

try {   
    $parser->setSecChUa('"Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104"');
    $parser->setUA('Mozilla/5.0 (Linux; Android 11; CPH2001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36');
    $parser->setSecChUaMobile('?1');
    $parser->setSecChUaFullVersion('"104.0.5112.97"');
    $parser->setSecChUaPlatform('"Android"');
    $parser->setSecChUaPlatformVersion('"11.0.0"');
    $parser->setSecChUaModel('"CPH2001"');
    $ret = $parser->parse();
    print_r($ret); 
} catch (Exception $ex) {
    echo "Error: " . $ex->getMessage(). PHP_EOL;
}

Automatic updates download

Author

v3 format

For the previous data format (v3), please use https://github.com/udger/udger-php

统计信息

  • 总下载量: 127.21k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-25