public function IsWeixinOrAlipay()
{
$ua = $_SERVER[‘HTTP_USER_AGENT‘];
if (strpos($ua, ‘MicroMessenger‘)) {
echo ‘微信‘;
}
elseif (strpos($ua, ‘AlipayClient‘)) {
echo "支付寶";
}
elseif (strpos($ua, ‘QQ/‘)) {
echo "QQ";
}else{
echo "其他";
}
}
原文地址:https://www.cnblogs.com/leaf-cq/p/8568200.html
时间: 2024-10-19 18:23:16