QQ防红并跳转默认浏览器方法,下列代码请加入全局文件中
if (strpos($_SERVER['HTTP_USER_AGENT'], 'QQ/') !== false and $type == "ture") {
exit('<script src="https://open.mobile.qq.com/sdk/qqapi.js?_bid=152"></script><script type="text/javascript">alert("请从浏览器内打开本站");mqq.ui.openUrl({ target: 2,url: "http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'"});</script>');
}
评论 (1)