Answers for "php detect device type"

PHP
5

check if user is on mobile php

function isMobile() {
    return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
}
Posted by: Guest on November-05-2020

Browse Popular Code Answers by Language