Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

how to check the page is loaded in mobile or browser using PHP

Be First!
by April 9, 2014 PHP

how to check the page is loaded in mobile or browser using PHP

This is possible with the help of following PHP Library
http://mobiledetect.net

Using that it’s very easy to only display content for a mobile:

include ‘Mobile_Detect.php’;
$isMobile = new Mobile_Detect();
// Check for any mobile device.
if ($isMobile>isMobile()) {
// Display Mobile Content
} else {
// Display other than Mobile Content (Desktop, Browser, etc)

}

(643)

Previous
Next

Leave a Reply