Mobile-Detect is a lightweight PHP library that inspects the HTTP user agent string and HTTP headers to detect whether a request comes from a mobile, tablet, or desktop device. It includes a rich set of detection rules covering device brands, operating systems, and browser engines so developers can tailor responses (views, assets, or layouts) based on client form factor. Its API is simple: isMobile(), isTablet(), or deviceFamily() methods make branching logic intuitive. The library is used in server-rendered PHP apps, CMS themes, and frameworks to serve mobile-friendly templates or redirect users to mobile versions. Because it is pattern-driven and optimized for fast matching, it adds minimal runtime overhead to request handling. By abstracting away the complexity of UA sniffing, Mobile-Detect helps teams gracefully support multi-device clients without duplicating detection logic.

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

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Mobile Detect

Mobile Detect Web Site

Other Useful Business Software
Skillfully - The future of skills based hiring Icon
Skillfully - The future of skills based hiring

Realistic Workplace Simulations that Show Applicant Skills in Action

Skillfully transforms hiring through AI-powered skill simulations that show you how candidates actually perform before you hire them. Our platform helps companies cut through AI-generated resumes and rehearsed interviews by validating real capabilities in action. Through dynamic job specific simulations and skill-based assessments, companies like Bloomberg and McKinsey have cut screening time by 50% while dramatically improving hire quality.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Mobile Detect!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2025-09-11