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)

}

Written by 

Salesforce MVP | 15x Salesforce Certified | Lightning Champion | Application Architect | 6x Trailhead Ranger | Sydney | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *

*