PHPackages                             czepter/detect-device - 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. czepter/detect-device

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

czepter/detect-device
=====================

fork of the incredible work of Kevin Warren (detectdevice.com). Easy to use lib for device detection.

v1.0.2(6y ago)0421MITPHP

Since Apr 19Pushed 6y agoCompare

[ Source](https://github.com/czepter/detect-device)[ Packagist](https://packagist.org/packages/czepter/detect-device)[ RSS](/packages/czepter-detect-device/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

PHP Class
=========

[](#php-class)

Simply include or require the class file &amp; use. No need to instantiate the class as all methods are static:

```
require_once '../vendor/autoload.php';
require_once '../src/Detect.php';

// Any mobile device (phones or tablets)
if (Detect\Detect::isMobile()) {
	echo 'is mobile!';
}

// Gets the device type ('Computer', 'Phone' or 'Tablet')
echo Detect\Detect::deviceType();

// Any phone device
if (Detect\Detect::isPhone()) {
	echo 'is phone!';
}

// Any tablet device
if (Detect\Detect::isTablet()) {
	echo 'is tablet!';
}

// Any computer device (desktops or laptops)
if (Detect\Detect::isComputer()) {
	echo 'is computer!';
}

// Get the IP address of the device
echo Detect\Detect::ip();

// Get the ID address host name of the device
echo Detect\Detect::ipHostname();

// Get the IP address organisation of the device
echo Detect\Detect::ipOrg();

// Get the country the IP address is in (IP address location inaccurate)
// (JS function available which uses the Geolocation API)
echo Detect\Detect::ipCountry();

// Get the name & version of operating system
echo Detect\Detect::os();

// Get the name & version of browser
echo Detect\Detect::browser();

// Detect\Detects if IE is version 9 or less & if it is, returns a warning:
// YOU ARE USING AN OUTDATED BROWSERIt is limiting your experience.Please upgrade your browser.
// Optionally, send html to be prepended or appended to warning
echo Detect\Detect::ieOld([$prependHTML = ''],[ $appendHTML = '']);

// Get the brand of device (only works with mobile devices otherwise return null)
echo Detect\Detect::brand();

// Check for a specific platform with the help of the magic methods:
if (Detect\Detect::isiOS()) {

}

if (Detect\Detect::isAndroidOS()) {

}
```

Copyright
---------

[](#copyright)

Developed by [Kevin Warren](https://twitter.com/KevinTWarren)

Download of plain version under [detectdevice.com](https://detectdevice.com/#download)

Detect Device is an open-source script released under [MIT License](https://opensource.org/licenses/MIT)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~32 days

Total

2

Last Release

2550d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db7ae2a07a591dd9d39b76e551b53df177cbacdd3e5d1b82ef8e5ef621363770?d=identicon)[czepter](/maintainers/czepter)

---

Top Contributors

[![czepter](https://avatars.githubusercontent.com/u/34108004?v=4)](https://github.com/czepter "czepter (6 commits)")

### Embed Badge

![Health badge](/badges/czepter-detect-device/health.svg)

```
[![Health](https://phpackages.com/badges/czepter-detect-device/health.svg)](https://phpackages.com/packages/czepter-detect-device)
```

###  Alternatives

[jenssegers/agent

Desktop/mobile user agent parser with support for Laravel, based on Mobiledetect

4.8k67.8M440](/packages/jenssegers-agent)[hisorange/browser-detect

Browser &amp; Mobile detection package for Laravel.

1.1k10.1M50](/packages/hisorange-browser-detect)[shetabit/visitor

Laravel visitor

565578.2k8](/packages/shetabit-visitor)[suncat/mobile-detect-bundle

Symfony2/3/4 bundle for detect mobile devices, managing mobile view types, redirect to mobile version.

4035.3M7](/packages/suncat-mobile-detect-bundle)[ziming/laravel-email-sniper-link

Laravel package to generate email sniper links based on given email

1519.9k](/packages/ziming-laravel-email-sniper-link)[superbig/craft3-mobiledetect

Use Mobile\_Detect for detecting mobile devices (including tablets)

1953.3k](/packages/superbig-craft3-mobiledetect)

PHPackages © 2026

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