Download Library From : http://aksolution.co.nf/wp-content/uploads/2018/07/Mobile-Detect.zip
require_once ‘Mobile-Detect/Mobile_Detect.php’; //include library file path
$detect = new Mobile_Detect;
$deviceType = ($detect->isMobile() ? ($detect->isTablet() ? ‘tablet’ : ‘phone’) : ‘computer’); // display device
name like : tablet,phone,computer.
$scriptVersion = $detect->getScriptVersion();
$devicedetail = $deviceType.’ ‘.$_SERVER[‘HTTP_USER_AGENT’];
//print device detail with some info.
echo “<pre>”;
print_r($devicedetail);
echo “<pre>”;
print_r($devicedetail);
-------------------------------------------------
Let me know your thoughts and questions in the comments.
Email: vyasankit2008@gmail.com
No comments:
Post a Comment