Mobile-Detect is a lightweight PHP library (class/package) for detecting mobile devices (including tablets). It examines the HTTP User-Agent string and certain HTTP headers and uses regular expressions (regexes) to determine whether a request comes from a phone, tablet, or other device class. It is designed for use on the server side (not as a replacement for client-side detection), to help with responsive design logic, redirects, or device-specific behavior. It is MIT-licensed.
Features
- Detects whether the visitor is using a mobile phone versus a tablet
- Detects specific mobile operating systems (e.g. iOS, Android, Windows Phone) via regex matching
- Ability to detect feature‐conflicting user-agents (resolution of conflicts in detection)
- Can be used both via Composer (as a package) and as a standalone class file
- Lightweight, minimal dependencies, intended for server‐side use (low overhead)
- Regularly updated with new regexes; versioning that supports PHP versions as appropriate
Categories
LibrariesLicense
MIT LicenseFollow Mobile Detect
nel_h2
MongoDB Atlas runs apps anywhere
MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of Mobile Detect!