*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.*
We're committed to make Mobile_Detect the best open-source mobile detection resource and this is why before
each release we're running [unit tests](./tests), we also research and update the detection rules on **daily**
and **weekly** basis.
Your website's _content strategy_ is important! You need a complete toolkit to deliver an experience that is _optimized_, _fast_ and _relevant_ to your users. Mobile_Detect class is a [server-side detection](http://www.w3.org/TR/mwabp/#bp-devcap-detection) tool that can help you with your RWD strategy, it is not a replacement for CSS3 media queries or other forms of client-side feature detection.
##### Announcements
For `2.x` branch we are no longer taking optimizations pull requests, but only new regexes and User-Agents for our tests.
On `2.x` releases we are focusing on **new tablets only**. All the pull requests about TVs, bots or optimizations will be closed and analyzed after `3.0.0-beta` is released.
Still working on `3.0.0` branch to provide you with device detection!
We're really excited on this one!
We would like to speed this up, but life and family gets in the way ;)
Special thanks to **JetBrains** for providing licenses for **PHPStorm**. In case you never heard or tried PHPStorm, you're
You can use [composer](https://getcomposer.org/doc/00-intro.md) in your release and update process to make sure you have the latest Mobile_Detect version.
I'm currently paying for 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 that will keep the research going.
Special thanks to the community :+1: for donations, [BrowserStack](https://www.browserstack.com/) - for providing access to their great platform, [Zend](http://www.zend.com/) - for donating licenses, [Dragos Gavrila](https://twitter.com/grafician) who contributed with the logo.
##### 3rd party modules / [Submit new](../../issues/new?title=New%203rd%20party%20module&body=Name, Link and Description of the module.)
:point_right: Keep `Mobile_Detect.php` class in a separate `module` and do NOT include it in your script core because of the high frequency of updates.
:point_right: When including the class into you `web application` or `module` always use `include_once '../path/to/Mobile_Detect.php` to prevent conflicts.
**JavaScript**
* mobile-detect.js - A [JavaScript port](https://github.com/hgoebl/mobile-detect.js) of Mobile-Detect class. Made by [Heinrich Goebl](https://github.com/hgoebl).
**Varnish Cache**
* [Varnish Mobile Detect](https://github.com/willemk/varnish-mobiletranslate) - Drop-in varnish solution to mobile user
detection based on the Mobile-Detect library. Made by [willemk](https://github.com/willemk).
* [mobiledetect2vcl](https://github.com/carlosabalde/mobiledetect2vcl) - Python script to transform the Mobile
Detect JSON database into an UA-based mobile detection VCL subroutine easily integrable in any Varnish Cache
configuration. Made by [Carlos Abalde](https://github.com/carlosabalde).
**LUA**
* [mobile-detect.lua](https://github.com/yourpalmark/mobile-detect.lua) is a port of Mobile-Detect to Lua for
NGINX HTTP servers. Follows closely to mobile-detect.js. Supports all methods that server-side
mobile-detect.js supports. Fully unit-tested and synced with Travis CI (Build Passing badge included).
Made by [Mark Walters](https://github.com/yourpalmark).
**PHP**
**WordPress**
* [WordPress Mobile Detect](https://wordpress.org/plugins/wp-mobile-detect/) - Gives you the ability to wrap that
infographic in a `[notdevice][/notdevice]` shortcode so at the server level WordPress will
decide to show that content only if the user is NOT on a phone or tablet.
Made by [Jesse Friedman](https://profiles.wordpress.org/professor44/).
* [mobble](https://wordpress.org/plugins/mobble/) - provides mobile related conditional functions for your site.
e.g. `is_iphone()`, `is_mobile()` and `is_tablet()`. Made by Scott Evans.
* [WordPress Responsage](https://github.com/iamspacehead/responsage) - A small WordPress theme plugin that allows
you to make your images responsive. Made by [Adrian Ciaschetti](https://github.com/iamspacehead).
* [WP247 Body Classes](https://wordpress.org/plugins/wp247-body-classes/) - Add unique classes to the `body` tag for
easy styling based on various attributes (archive, user, post, mobile) and various WordPress "is" functions.
Mobile attributes include type of device, Operating System, Browser, etc. Examples: .is-mobile, .is-not-mobile,
* [Laravel Mobile Detect](https://github.com/riverskies/laravel-mobile-detect) is a package that enables you to use device detection right in your Laravel Blade templates. (Utilises the well-known, constantly updated PHP mobile detection library.)
Made by [Barnabas Kecskes](https://github.com/barnabaskecskes).