两款简洁网站微信QQ防红提醒跳转代码

2022-04-10 0 63

前言

很多朋友想在微信或QQ内发博客等链接给好友查看,但是又担心被封红链接,用上这款防红跳转浏览器最好不过(已红的没效果)。演示图请查看上分大图,已测试QQ跟微信

使用教程

自行创建一个php文件,把代码放在php文件顶部(最顶部),或者放在index.php顶部内即可
样式一代码

<?php 
$conf['qqjump']=1;if(strpos($_SERVER['HTTP_USER_AGENT'], 'QQ/')||strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger')!==false && $conf['qqjump']==1){$siteurl='http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];echo '<html>
<html lang="en"><head><meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>请使用浏览器打开</title><style>.tips img{width:100%;height:auto}html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0;text-align:left}</style></head>
  <style>
        body,html{width:100%;height:100%}
        *{margin:0;padding:0}
        body{background-color:#fff}
        #browser img{
            width:50px;
        }
        #browser{
            margin: 0px 10px;
            text-align:center;
        }
        #contens{
            font-weight: bold;
            margin:-285px 0px 10px;
            text-align:center;
            font-size:20px;
            margin-bottom: 125px;
        }
        .top-bar-guidance{font-size:15px;color:#fff;height:70%;line-height:1.8;padding-left:20px;padding-top:20px;background:url(//gw.alicdn.com/tfs/TB1eSZaNFXXXXb.XXXXXXXXXXXX-750-234.png) center top/contain no-repeat}
        .top-bar-guidance .icon-safari{width:25px;height:25px;vertical-align:middle;margin:0 .2em}
        .app-download-tip{margin:0 auto;width:290px;text-align:center;font-size:15px;color:#2466f4;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcAQMAAACak0ePAAAABlBMVEUAAAAdYfh+GakkAAAAAXRSTlMAQObYZgAAAA5JREFUCNdjwA8acEkAAAy4AIE4hQq/AAAAAElFTkSuQmCC) left center/auto 15px repeat-x}
        .app-download-tip .guidance-desc{background-color:#fff;padding:0 5px}
        .app-download-btn{display:block;width:214px;height:40px;line-height:40px;margin:18px auto 0 auto;text-align:center;font-size:18px;color:#2466f4;border-radius:20px;border:.5px #2466f4 solid;text-decoration:none}
    </style>
<body>
<div class="top-bar-guidance">
    <p>点击右上角<img src="https://i.loli.net/2020/09/06/v9YQ8td6jSVeERm.png" class="icon-safari"> <span id="openm">Safari打开</span></p>
    <p>可以继续浏览本站哦~</p>
</div>
<a style="display: none;" href="" rel="external nofollow"  id="vurl" rel="noreferrer"></a>
<div id="contens">

<img src="https://i.loli.net/2020/09/06/2LlZHg6sFJpWnq1.jpg" width="90%">

</div>
<div id="browser">
   <img src="https://i.loli.net/2020/09/06/v9YQ8td6jSVeERm.png">
   <img src="https://i.loli.net/2020/09/06/ZkV2FAUceYpaGyM.png">
</div>
<div class="app-download-tip">
    <span class="guidance-desc">请使用上方浏览器打开本网址</span>

</div>
</body>
</html>';
exit;

if($nosecu==true)return;
//IP 屏蔽
$iptables='977012992~977013247|977084416~977084927|1743654912~1743655935|1949957632~1949958143|2006126336~2006127359|2111446272~2111446527|3418570752~3418578943|3419242496~3419250687|3419250688~3419275263|3682941952~3682942207|3682942464~3682942719|3682986660~3682986663|1707474944~1707606015|1884967642|1884967620|1893733510|1709332858|1709318620|1709325774|1709342057|1709341968|1709330358|1709335492|1709327575|1709327041|1709318626|1709318617|1709327557|1709327573|1975065457|1902908741|1902908705|3029946827';
$remoteiplong=bindec(decbin(ip2long(real_ip())));
foreach(explode('|',$iptables) as $iprows){
    if($remoteiplong==$iprows)exit('欢迎使用!');
    $ipbanrange=explode('~',$iprows);
    if($remoteiplong>=$ipbanrange[0] && $remoteiplong<=$ipbanrange[1])
        exit('欢迎使用!');
}
//HEADER 特征屏蔽
if(preg_match("/manager/", strtolower($_SERVER['HTTP_USER_AGENT'])) || preg_match("/QZONEJSSDK/", $_SERVER['HTTP_USER_AGENT']) || strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla')===false && strpos($_SERVER['HTTP_USER_AGENT'], 'ozilla')!==false || preg_match("/Windows NT 6.1/", $_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_ACCEPT']=='*/*' || preg_match("/Windows NT 5.1/", $_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_ACCEPT']=='*/*' || preg_match("/vnd.wap.wml/", $_SERVER['HTTP_ACCEPT']) && preg_match("/Windows NT 5.1/", $_SERVER['HTTP_USER_AGENT']) || isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'urls.tr.com')!==false || isset($_COOKIE['ASPSESSIONIDQASBQDRC']) || empty($_SERVER['HTTP_USER_AGENT']) || preg_match("/Alibaba.Security.Heimdall/", $_SERVER['HTTP_USER_AGENT'])) {
    exit('欢迎使用!');
}
if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone OS 9_3_4')!==false && $_SERVER['HTTP_ACCEPT']=='*/*' || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone OS 8_4')!==false && $_SERVER['HTTP_ACCEPT']=='*/*' || strpos($_SERVER['HTTP_USER_AGENT'], 'Android 6.0.1')!==false && strpos($_SERVER['HTTP_USER_AGENT'], 'MQQBrowser/6.8')!==false && $_SERVER['HTTP_ACCEPT']=='*/*' || strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'en')!==false && strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'zh')===false || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')!==false && strpos($_SERVER['HTTP_USER_AGENT'], 'en-')!==false && strpos($_SERVER['HTTP_USER_AGENT'], 'zh')===false) {
    exit('您当前浏览器不支持或操作系统语言设置非中文,无法访问本站!');
}
}
?>

样式二代码

<?php 
$conf['qqjump']=1;if(strpos($_SERVER['HTTP_USER_AGENT'], 'QQ/')||strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger')!==false && $conf['qqjump']==1){$siteurl='http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];echo '<html>
<html lang="en"><head><meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>请使用浏览器打开</title><style>.tips img{width:100%;height:auto}html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0;text-align:left}</style></head>
<body><div class="tips" ><img src="https://i.loli.net/2020/08/28/3YGTwxtArkHsI86.jpg" alt="请使用浏览器打开" />
</div>
<div class="tips" >
<center>请使用Safari浏览器打开<br><hr width="60%"></center>
</div>
</body>
</html>';
exit;
 //图二https://cdn.u1.huluxia.com/g4/M02/5F/A1/rBAAdl7crWGAWhUeAABtVmN3384080.png 安卓

if($nosecu==true)return;
//IP 屏蔽
$iptables='977012992~977013247|977084416~977084927|1743654912~1743655935|1949957632~1949958143|2006126336~2006127359|2111446272~2111446527|3418570752~3418578943|3419242496~3419250687|3419250688~3419275263|3682941952~3682942207|3682942464~3682942719|3682986660~3682986663|1707474944~1707606015|1884967642|1884967620|1893733510|1709332858|1709318620|1709325774|1709342057|1709341968|1709330358|1709335492|1709327575|1709327041|1709318626|1709318617|1709327557|1709327573|1975065457|1902908741|1902908705|3029946827';
$remoteiplong=bindec(decbin(ip2long(real_ip())));
foreach(explode('|',$iptables) as $iprows){
    if($remoteiplong==$iprows)exit('欢迎使用!');
    $ipbanrange=explode('~',$iprows);
    if($remoteiplong>=$ipbanrange[0] && $remoteiplong<=$ipbanrange[1])
        exit('欢迎使用!');
}
//HEADER 特征屏蔽
if(preg_match("/manager/", strtolower($_SERVER['HTTP_USER_AGENT'])) || preg_match("/QZONEJSSDK/", $_SERVER['HTTP_USER_AGENT']) || strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla')===false && strpos($_SERVER['HTTP_USER_AGENT'], 'ozilla')!==false || preg_match("/Windows NT 6.1/", $_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_ACCEPT']=='*/*' || preg_match("/Windows NT 5.1/", $_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_ACCEPT']=='*/*' || preg_match("/vnd.wap.wml/", $_SERVER['HTTP_ACCEPT']) && preg_match("/Windows NT 5.1/", $_SERVER['HTTP_USER_AGENT']) || isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'urls.tr.com')!==false || isset($_COOKIE['ASPSESSIONIDQASBQDRC']) || empty($_SERVER['HTTP_USER_AGENT']) || preg_match("/Alibaba.Security.Heimdall/", $_SERVER['HTTP_USER_AGENT'])) {
    exit('欢迎使用!');
}
if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone OS 9_3_4')!==false && $_SERVER['HTTP_ACCEPT']=='*/*' || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone OS 8_4')!==false && $_SERVER['HTTP_ACCEPT']=='*/*' || strpos($_SERVER['HTTP_USER_AGENT'], 'Android 6.0.1')!==false && strpos($_SERVER['HTTP_USER_AGENT'], 'MQQBrowser/6.8')!==false && $_SERVER['HTTP_ACCEPT']=='*/*' || strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'en')!==false && strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'zh')===false || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')!==false && strpos($_SERVER['HTTP_USER_AGENT'], 'en-')!==false && strpos($_SERVER['HTTP_USER_AGENT'], 'zh')===false) {
    exit('您当前浏览器不支持或操作系统语言设置非中文,无法访问本站!');
}
}
?>

 

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

酷乐网络 其他 两款简洁网站微信QQ防红提醒跳转代码 https://www.kkule.com/177.html

上一篇:

已经没有上一篇了!

服务支持
  • 请需要服务的小伙伴们联系客服,支持正版服务,感谢! 1.购买本站模板源码的小伙伴,遇到使用问题(比如哪里文字修改找不到之类),均可以找酷乐咨询。 2.提供酷乐自己录制的视频教程N套,和文字图片教程,确保安装使用后期修改无忧! 3.一些小修改,比如模板某个位置颜色改变,比如某个区块调用改变,比如一些小样式调整。可以免费帮助!(如改动有太多工作量,请详谈劳务费哦,要不累死酷乐了!) 4.提供源码核心升级包文件,包含文件和数据库核心升级! 5.默认购买为和演示站一样的整站模板源码,所以提供一次免费整站安装服务(请提供主机等信息)。 6.免费帮助清理整站的测试数据,并清空数据ID归0!
查看详情
  • 1.模板修改,功能增加。一些特殊修改和改进,此服务按照工作量收费,如有需要,请先详谈商议后报价! 2.服务器VPS环境搭建部署,虚拟空间调试。这个按照具体情况酌情收费。 3.保留数据更换模板服务,此服务需要先具体沟通查看原站后才能知道可以做否并报价。 4.增加多端服务,此服务复杂繁琐,具体沟通后详议,一般不接此类改造。 5.网站搬家属体力活,费用为每站每次100点。需提供新老服务器或者空间信息!
查看详情

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务