用一个不报毒的域名,放入一下代码(PHP)!原理就是 利用不报毒域名打开+QQ跳转浏览器 + 跳转到主域名,测试系统:ios、测试域名:cn、top 测试结果:OK。
代码如下:
//直接跳转到指定网址
<?php
$url = "http://www.qzoner.cn";//这里是要跳转的域名
$scriptpath = str_replace('', '/', $_SERVER['SCRIPT_NAME']);
$sitepath = substr($scriptpath, 0, strrpos($scriptpath, '/'));
$siteurl = ($_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $sitepath . '/';
if (strpos($_SERVER['HTTP_USER_AGENT'], 'QQ/') !== !1 ) {
echo '<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>请使用浏览器打开</title>
<script src="https://open.mobile.qq.com/sdk/qqapi.js?_bid=152"></script>
<script type="text/javascript"> mqq.ui.openUrl({ target: 2,url: "' . $url . '"}); </script>
</head>
<body></body>
</html>';
exit;
}else{
echo "<script type='text/javascript'>";
echo "window.location.href='$url'";
echo "</script>";
}
?>
//先用浏览器打开当前域名 再做跳转
<?php
$url = "http://www.qzoner.cn";//这里是要跳转的域名
$scriptpath = str_replace('', '/', $_SERVER['SCRIPT_NAME']);
$sitepath = substr($scriptpath, 0, strrpos($scriptpath, '/'));
$siteurl = ($_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $sitepath . '/';
if (strpos($_SERVER['HTTP_USER_AGENT'], 'QQ/') !== !1 ) {
echo '<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>请使用浏览器打开</title>
<script src="https://open.mobile.qq.com/sdk/qqapi.js?_bid=152"></script>
<script type="text/javascript"> mqq.ui.openUrl({ target: 2,url: "' . $siteurl. '"}); </script>
</head>
<body></body>
</html>';
exit;
}
echo "<script type='text/javascript'>";
echo "window.location.href='$url'";
echo "</script>";
?>
资源均来自第三方,谨慎下载,前往第三方网站下载