Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

Mobile-Detect

> AI 编程
Open source

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

10.7K stars0 likes2 views
WebsiteGitHub

About

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

MobileDetect, PHP mobile detection class

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.

Before you install

MobileDetect is maintained on one rolling branch per major line. Tags follow the pattern <major>.<minor>.<patch> and always live on the matching branch.

Version Tests Namespace Branch PHP Version Purpose
2.* \Mobile_Detect 2.x >=5.6,<7.0 Deprecated
3.* Detection\MobileDetect 3.x >=7.4,<8.0 LTS
4.* Detection\MobileDetect 4.x >=8.2 (since 4.10.0, previously >=8.0) Current, Recommended

Supporting

If you are using Mobile Detect open-source package in your production apps, in presentation demos, hobby projects, school projects or so, you can sponsor my work by donating a small amount :+1:.

I'm currently paying for domains, hosting and spend a lot of my family time to maintain the project and planning the future releases. I would highly appreciate any money donations.

Special thanks to:

  • the community :+1: for donations, submitting patches and issues
  • Gitbook team for the open-source license for their technical documentation tool.

Documentation

The entire documentation is available on Gitbook: https://docs.mobiledetect.net

Demo

Point your device to: https://demo.mobiledetect.net

Testing

bash
vendor/bin/phpunit -v -c tests/phpunit.xml --coverage-html .coverage

Contributing

Please see the Contribute guide for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

  • Serban Ghita
  • All Contributors

Issues· 18 open

View all issuesOpen on GitHub
  • #995

    Issue with downloading the Brave browser from Playstore.

    Updated Aug 28, 2025
  • #993

    [bug] Iphone 15 Pro Max

    type: bugUpdated Jul 10, 2025
  • #992

    The tablet detection on my website is not working for me

    Updated Jul 1, 2025
  • #990

    Ssss

    Updated Jun 10, 2025
  • #987

    [question] Can php7.3 use version 3.74.x ?

    Updated Apr 9, 2025
  • #983

    [bug]

    type: bugUpdated Mar 5, 2025
  • #906

    Support of UA client hints in Mobile-Detect

    type: questiondiscussionUser-Agent reduction initiativeUser-Agent client hintsUpdated Nov 8, 2024
  • #959

    [bug]

    type: bugUpdated Nov 8, 2024
  • #942

    Chrome's user agent reduction results in no longer detecting Android tablets as a tablet device

    discussionUser-Agent reduction initiativeUser-Agent client hintsUpdated Nov 8, 2024
  • #963

    [bug] isChrome() returns false on Chrome browser

    type: bugUpdated Sep 14, 2024

> Tags

PHPdevice-detectionmobile-detectmobile-redirectsphp

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.