PHPackages                             scn/udger-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. scn/udger-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

scn/udger-php
=============

PHP agent string parser based on Udger https://udger.com/products/local\_parser

v4.4.0(6mo ago)040.2k↓32.3%2MITPHPPHP ^8CI passing

Since Jan 22Pushed 6mo agoCompare

[ Source](https://github.com/SC-Networks/udger-php)[ Packagist](https://packagist.org/packages/scn/udger-php)[ RSS](/packages/scn-udger-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (6)Dependencies (1)Versions (17)Used By (0)

Udger client for PHP (data ver. 3)
==================================

[](#udger-client-for-php-data-ver-3)

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 50.000 unique user agents.
- Up to date data provided by

### Requirements

[](#requirements)

- php &gt;= 8.0.0
- ext-sqlite3 ()
- datafile v3 (udgerdb\_v3.dat) from

### Features

[](#features)

- Fast
- LRU cache
- Released under the MIT

### Install

[](#install)

```
composer require udger/udger-php

```

### Usage

[](#usage)

You should review the included examples (`parse.php`, `account.php`)

Here's a quick example:

```
require_once dirname(__DIR__) . '/vendor/autoload.php';
$factory = new Udger\ParserFactory();
$parser = $factory->getParser();
$parser->setDataFile(sys_get_temp_dir() . "/udgercache/udgerdb_v3.dat");
//$parser->setCacheEnable(false);
//$parser->setCacheSize(4000);
$parser->setUA('Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-A510F Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.5 Chrome/38.0.2125.102 Mobile Safari/537.36');
$parser->setIP("2A02:598:7000:116:0:0:0:101");
$ret = $parser->parse();
echo "";
print_r($ret);
echo "";

Array
(
        [user_agent] => Array
        (
            [ua_string] => Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-A510F Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.5 Chrome/38.0.2125.102 Mobile Safari/537.36
            [ua_class] => Mobile browser
            [ua_class_code] => mobile_browser
            [ua] => Mobile Samsung Browser 3.5
            [ua_version] => 3.5
            [ua_version_major] => 3
            [ua_uptodate_current_version] =>
            [ua_family] => Mobile Samsung Browser
            [ua_family_code] => mobile_samsung_browser
            [ua_family_homepage] => http://developer.samsung.com/internet
            [ua_family_vendor] => SAMSUNG
            [ua_family_vendor_code] => samsung
            [ua_family_vendor_homepage] => http://www.samsung.com/
            [ua_family_icon] => samsung_browser.png
            [ua_family_icon_big] => samsung_browser_big.png
            [ua_family_info_url] => https://udger.com/resources/ua-list/browser-detail?browser=Mobile Samsung Browser
            [ua_engine] => WebKit/Blink
            [os] => Android 5.1 lollipop
            [os_code] => android_5_1
            [os_homepage] => https://en.wikipedia.org/wiki/Android_Lollipop
            [os_icon] => android.png
            [os_icon_big] => android_big.png
            [os_info_url] => https://udger.com/resources/ua-list/os-detail?os=Android 5.1 lollipop
            [os_family] => Android
            [os_family_code] => android
            [os_family_vendor] => Google, Inc.
            [os_family_vendor_code] => google_inc
            [os_family_vendor_homepage] => https://www.google.com/about/company/
            [device_class] => Smartphone
            [device_class_code] => smartphone
            [device_class_icon] => phone.png
            [device_class_icon_big] => phone_big.png
            [device_class_info_url] => https://udger.com/resources/ua-list/device-detail?device=Smartphone
            [device_marketname] => Galaxy A5 (2016)
            [device_vendor] => Samsung
            [device_vendor_code] => samsung
            [device_vendor_homepage] => http://www.samsung.com/
            [device_vendor_icon] => samsung.png
            [crawler_last_seen] =>
            [crawler_category] =>
            [crawler_category_code] =>
            [crawler_respect_robotstxt] =>
        )

    [ip_address] => Array
        (
            [ip] => 2A02:598:7000:116:0:0:0:101
            [ip_ver] => 6
            [ip_classification] => Crawler
            [ip_classification_code] => crawler
            [ip_hostname] =>
            [ip_last_seen] => 2016-02-12 04:28:56
            [ip_country] => Czech Republic
            [ip_country_code] => CZ
            [ip_city] => Prague
            [crawler_name] => SeznamBot/3.2-test1
            [crawler_ver] => 3.2-test1
            [crawler_ver_major] => 3
            [crawler_family] => SeznamBot
            [crawler_family_code] => seznambot
            [crawler_family_homepage] => http://napoveda.seznam.cz/cz/seznambot.html
            [crawler_family_vendor] => Seznam.cz, a.s.
            [crawler_family_vendor_code] => seznam-cz_as
            [crawler_family_vendor_homepage] => http://www.seznam.cz/
            [crawler_family_icon] => seznam.png
            [crawler_family_info_url] => https://udger.com/resources/ua-list/bot-detail?bot=SeznamBot#id12590
            [crawler_last_seen] => 2016-02-15 06:12:28
            [crawler_category] => Search engine bot
            [crawler_category_code] => search_engine_bot
            [crawler_respect_robotstxt] => unknown
            [datacenter_name] =>
            [datacenter_name_code] =>
            [datacenter_homepage] =>
        )

)
```

### Running tests

[](#running-tests)

```
./vendor/bin/codecept run

```

### Automatic updates download

[](#automatic-updates-download)

- for autoupdate data use Udger data updater ()

### Documentation for programmers

[](#documentation-for-programmers)

-

### Author

[](#author)

- The Udger.com Team ()

### old v2 format

[](#old-v2-format)

If you still use the previous format of the db (v2), please see the branch old\_format\_v2

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance66

Regular maintenance activity

Popularity29

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~301 days

Recently: every ~476 days

Total

13

Last Release

198d ago

Major Versions

v1.4.1 → v3.0.02016-07-16

3.1.3 → v4.0.12020-10-01

PHP version history (6 changes)v1.4.0PHP &gt;=5.3.0

v4.0.1PHP &gt;=5.5.0

v4.1.0PHP ^7.4 || ^8

v4.2.0PHP ~8.0.0||~8.1.0||~8.2.0||~8.3.0

v4.3.0PHP ~8.0.0||~8.1.0||~8.2.0||~8.3.0||~8.4.0

v4.4.0PHP ^8

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/571575?v=4)[scn](/maintainers/scn)[@scn](https://github.com/scn)

---

Top Contributors

[![mallat](https://avatars.githubusercontent.com/u/5707281?v=4)](https://github.com/mallat "mallat (21 commits)")[![usox](https://avatars.githubusercontent.com/u/5184763?v=4)](https://github.com/usox "usox (8 commits)")[![WorksDev](https://avatars.githubusercontent.com/u/6623695?v=4)](https://github.com/WorksDev "WorksDev (6 commits)")[![moknomo](https://avatars.githubusercontent.com/u/2641095?v=4)](https://github.com/moknomo "moknomo (3 commits)")[![joewreschnig](https://avatars.githubusercontent.com/u/1330897?v=4)](https://github.com/joewreschnig "joewreschnig (3 commits)")[![shawnbayer](https://avatars.githubusercontent.com/u/10172577?v=4)](https://github.com/shawnbayer "shawnbayer (1 commits)")[![adaamz](https://avatars.githubusercontent.com/u/4347332?v=4)](https://github.com/adaamz "adaamz (1 commits)")[![tiborb](https://avatars.githubusercontent.com/u/3955068?v=4)](https://github.com/tiborb "tiborb (1 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/scn-udger-php/health.svg)

```
[![Health](https://phpackages.com/badges/scn-udger-php/health.svg)](https://phpackages.com/packages/scn-udger-php)
```

###  Alternatives

[joshhanley/livewire-autocomplete

An autocomplete dropdown for Livewire

103112.4k1](/packages/joshhanley-livewire-autocomplete)[leongrdic/smplang

A simple language written in PHP that evaluates expressions without eval

16831.4k4](/packages/leongrdic-smplang)[gerardojbaez/vehicle

Laravel 5.2 package to work with vehicles data.

171.8k](/packages/gerardojbaez-vehicle)[radialapps/banner-warn

Show avatars in roundcube message list with warnings

131.5k](/packages/radialapps-banner-warn)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
