# 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.

Repository: https://github.com/serbanghita/Mobile-Detect
Canonical: https://ross.abutalabs.com/products/mobile-detect
Homepage: http://mobiledetect.net
Language: PHP
License: MIT
License Family: permissive
Topics: mobile-detect, device-detection, user-agents, php, mobile-redirects
Last push: 2026-08-11T19:09:26+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 85, longevity 100
- inputs: {"age_days": 5115, "days_push": 22, "days_rel": 101, "gap_med": 15.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10680, forks 2608 (observed 2026-08-28T04:10:43.743668+00:00)

## What it is
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
- artifact type: library
- maturity: active
- function: http-server, middleware, developer-tools
- domain: web-development, mobile-development, developer-tools
- platform: php
- tags: user-agent-detection, device-detection, responsive-web-design, mobile-redirects, regex-based, web-server

## Member repositories
- serbanghita/Mobile-Detect (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:43.743668+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:18:11.484107+00:00, confidence not recorded.
  - readme: https://github.com/serbanghita/Mobile-Detect (fetched 2026-08-28T04:10:43.743668+00:00, sha 7bf0f3c19618)
  - homepage: http://mobiledetect.net (fetched 2026-08-29T08:17:16.779157+00:00, sha 1fe3fe6a917c)
  - site_page: https://docs.mobiledetect.net/ (fetched 2026-08-29T08:17:16.788647+00:00, sha b9db27ad32dc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
