1. 程式人生 > >php獲取設備型號

php獲取設備型號

gen UNC oid $_server serve turn ios strtol The

/* 獲取設備型號 */ 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獲取設備型號