serbanghita/Mobile-Detect
Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment. observed · 2026-08-28
Health v2 · maintenance only
93/100
- Activity 97
- Release rhythm 85
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 15.0
- age_days: 5115
- days_rel: 101
- days_push: 22
- n_releases_24m: 3
Adoption not part of the score
10680 stars · 2608 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
MobileDetect is a lightweight PHP library that detects mobile devices, including distinguishing phones from tablets, using User-Agent strings and HTTP headers with regex matching. It supports server-side responsive web design strategies and is maintained across multiple PHP version lines.
Use cases
- detect mobile devices in php
- serve different content to phones and tablets
- redirect mobile users to a mobile site
- server-side responsive web design detection
- identify tablet vs phone from user agent
- detect mobile browser in php app
When to choose
- you need lightweight server-side device detection in PHP
- you must distinguish phones from tablets server-side
- you want a mature, widely used detection library with MIT license
When to avoid
- you need client-side feature detection or CSS media queries
- you need full browser or OS capability profiling
- your project runs on PHP below 8.2 and you need the latest features
Facets
library · maturity active
http-server middleware developer-tools web-development mobile-development developer-tools php user-agent-detection device-detection responsive-web-design mobile-redirects regex-based web-server
3 sources
- readme: https://github.com/serbanghita/Mobile-Detect · fetched 2026-08-28 · 7bf0f3c19618
- homepage: http://mobiledetect.net · fetched 2026-08-29 · 1fe3fe6a917c
- site_page: https://docs.mobiledetect.net/ · fetched 2026-08-29 · b9db27ad32dc
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| serbanghita/Mobile-Detect | main | 93 |
For agents
markdown · JSON · MCP: product_card(name="serbanghita/Mobile-Detect")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem