PHP 判断当前扫码的客户端浏览器类型

if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){

$sys["systerm"] = 'IOS';

// }else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){

// $sys["systerm"] = 'Android';

}else if( strpos($_SERVER['HTTP_USER_AGENT'], 'AlipayClient') !== false ){

$sys["systerm"] = '支付宝';

}else if( strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false ){

$sys["systerm"] = '微信';

}else{

$sys["systerm"] = 'systerm is other';

}

print_r($sys);

你可能感兴趣的:(PHP 判断当前扫码的客户端浏览器类型)