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 

2x Salesforce MVP | Platform Champion | 18x Salesforce Certified | MuleSoft Certified | 8x Trailhead Ranger | TechForce Services | Sydney | Australia

Leave a Reply

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

*