How to get this thing working!
Use form below to select how you wish to handle mobile browsers you've detected, you can send them to a mobile site, to an app store or have the function return true or false giving your scripts control.
It should be as simple as a cut and paste but you need to understand at least basic PHP to get it working.
You need to include the file with the function then call the function before your PHP pages do anything else.
$mobile = mobile_device_detect();
The function has a number of parameters that can be passed to it which define the way it handles different scenarios. These paramaters are:
- Apple iPhones
- Apple iPads
- Google Android Mobiles
- Opera Mobile Browser
- BlackBerry / RIM Devices
- Palm Mobiles
- Windows Mobiles
Mobile Redirect URL - This should be full web address (including http://) of the site (or page) you want to send mobile visitors to. Leaving this blank will make the script return true when it detects a mobile.
Desktop Redirect URL - This should be full web address (including http://) of the site (or page) you want to send non-mobile visitors to. Leaving this blank will make the script return false when it fails to detect a mobile.