Registry / utility / mobiledetect-mobiledetectlib

mobiledetect-mobiledetectlib

JSON →
library4.11.0phppackagistunverified

Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.

composer require mobiledetect/mobiledetectlib
INSTALL
IMPORT
SIG · MOBILEDETECT-MOBIL
M
mobiledetect-mobiledetectlib
utilityphpv4.11.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MobileDetect
✓ use Detection\MobileDetect;

Detect if the current request is from a mobile device.

use Detection\MobileDetect; $detect = new MobileDetect(); if ($detect->isMobile()) { echo 'Mobile device detected'; }
Debug
Known issues
gotchaDetection relies on User-Agent header which can be spoofed.
fix
Do not rely solely on this for security decisions.
affects: >=4.0.0
Upgrade
Version history
4.11.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
mobiledetect-mobiledetectlib — pip install mobiledetect-mobiledetectlib · libregistry