Free Exclusive And High Quality PSD Photoshop Resource For Web Design

Mobile Detect

Detect the type of mobile device accessing a site
Mobile_Detect is a simple PHP class for easy detection of the most popular mobile devices platforms: Android, Blackberry, Opera Mini, Palm, Windows Mobile, as well as generic ones.

This class can be used to detect the type of mobile device accessing a site.


It can analyze the current HTTP user agent request header to determine which type if mobile device is accessing the site.



Currently it can distinguish several types of mobile device that use different systems and mobile browsers: Android, Blackberry, Opera Mini, Palm, Windows Mobile, and other generic systems.


Usage


Include and instantiate the class:
include("Mobile_Detect.php");
$detect = new Mobile_Detect();
Check for a specific platform:
if ($detect->isAndroid()) {
    // code to run for the Google Android platform
}
Available methods are isAndroid(), isBlackberry(), isOpera(), isPalm(), isWindows(), isGeneric(). Alternatively, if you are only interested in checking to see if the user is using a mobile device, without caring for specific platform:
if ($detect->isMobile()) {
    // any mobile platform
}
current version: 3
Date Added: Dec 12th, 2009
Filed in: projects » PHP Scripts » PHP Class Scripts » Wireless and Mobile
Publisher: jooria
Contact Info: Send a Message to jooria
the team: view the project Peoples
1 points ( 100% like it)

1 up votes 0 down votes

I Use It - simple:
0 person is using this project