Home PHP how to check the page is loaded in mobile or browser using 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)

}

You may also like

Leave a Comment