• 用一個不報毒的域名,放入一下代碼(PHP)!
  • 原理就是 利用不報毒域名打開+QQ跳轉瀏覽器 + 跳轉到主域名
  • 測試系統:ios、測試域名:cn、top 測試結果:OK


//直接跳轉到指定網址


<?php

$url = "http://www.trlepi.tw";//這里是要跳轉的域名

$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.trlepi.tw";//這里是要跳轉的域名
$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>";

?>

歡迎留言

5 條評論

江苏e球彩开奖结果图