网站建设资讯

NEWS

网站建设资讯

php获取设备型号

/*
 获取设备型号
 */
function get_device_type(){
    $agent = strtolower($_SERVER['HTTP_USER_AGENT']);
    $type = 'other';
    if(strpos($agent, 'iphone') || strpos($agent, 'ipad') ){
        $type = 'ios';
    }
    if(strpos($agent, 'android')){
        $type = 'android';
    }
    return $type;
}

网页题目:php获取设备型号
当前路径:http://cdweb.net/article/giopgj.html