PHPackages                             phpmk/devicedata - 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. phpmk/devicedata

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

phpmk/devicedata
================

PHP.mk PHP Library for using Device API service

v3(5y ago)1101GPL-3.0-or-laterPHPPHP &gt;=5.6.0

Since Nov 6Pushed 5y ago2 watchersCompare

[ Source](https://github.com/mihajlo/device-data)[ Packagist](https://packagist.org/packages/phpmk/devicedata)[ Docs](https://php.mk/)[ RSS](/packages/phpmk-devicedata/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

DeviceDetails PHP library for visitors devices
==============================================

[](#devicedetails-php-library-for-visitors-devices)

With this library, you can very easily detect device details. Especially for mobile and tablet.

---

#### Composer installation

[](#composer-installation)

composer require phpmk/devicedata:v1

### Configuration:

[](#configuration)

#### ./config/config-sample.php

[](#configconfig-samplephp)

```

```

---

### How to use:

[](#how-to-use)

#### ./examples/simple.php

[](#examplessimplephp)

```

```

---

#### ./examples/advanced.php

[](#examplesadvancedphp)

```

```

---

### Public methods:

[](#public-methods)

 **DeviceDetails :: \_\_construct**```
/**
* Initialize class object
*
* @param array $token Token for web service
*
* @return object|null Return instance of the class or null if missing token
/
```

---

 ****DeviceDetails :: setUserAgent****```
/
* Manually set UserAgent
*
* @param string $userAgent Browser UserAgent
*
* @return void
/
```

---

 ****DeviceDetails :: getDevice****```
/
* Get Device data
*
* @return mixed Return everything about device
/
```

---

 ****DeviceDetails :: errors****```
/
* Get errors from service
*
* @return array Return service errors
**/
```

---

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% of commits — single point of failure

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 ~3 days

Total

3

Last Release

2012d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88845e592f225e04a7ea8ce3d4ed247a3c811dab5ac45fb956fdce75c68bffc2?d=identicon)[mihajlo](/maintainers/mihajlo)

---

Top Contributors

[![mihajlo](https://avatars.githubusercontent.com/u/848672?v=4)](https://github.com/mihajlo "mihajlo (9 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

devicedetectionphp.mk

### Embed Badge

![Health badge](/badges/phpmk-devicedata/health.svg)

```
[![Health](https://phpackages.com/badges/phpmk-devicedata/health.svg)](https://phpackages.com/packages/phpmk-devicedata)
```

###  Alternatives

[cbschuld/browser.php

A PHP Class to detect a user's Browser. This encapsulation provides a breakdown of the browser and the version of the browser using the browser's user-agent string. This is not a guaranteed solution but provides an overall accurate way to detect what browser a user is using.

5876.7M19](/packages/cbschuld-browserphp)[patrickschur/language-detection

A language detection library for PHP. Detects the language from a given text string.

8513.2M18](/packages/patrickschur-language-detection)[foroco/php-browser-detection

Ultra fast PHP library to detect browser, OS, platform and device type by User-Agent parsing

1554.7M7](/packages/foroco-php-browser-detection)[wolfcast/browser-detection

The Wolfcast BrowserDetection PHP class facilitates the identification of the user's environment such as Web browser, version, platform family, platform version or if it's a mobile device or not.

1391.0M7](/packages/wolfcast-browser-detection)[nitotm/efficient-language-detector

Fast and accurate natural language detection. Detector written in PHP. Nito-ELD, ELD.

59252.9k6](/packages/nitotm-efficient-language-detector)[tivie/php-os-detector

A small utility library that detects the OS the server is running on

201.6M11](/packages/tivie-php-os-detector)

PHPackages © 2026

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