xxxmenger 发表于 2018-12-11 10:44:23

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;
}


页: [1]
查看完整版本: php获取设备型号