线报网 / PHP教程 / 简约QQ防红跳转指引PHP代码分享

简约QQ防红跳转指引PHP代码分享

【摘要】 代码简介: 一个PHP屏蔽QQ内打开代码+消失的彩虹屏蔽腾讯检测代码二合一,看到很多人都比较喜欢这个,于是我就把这个发了出来。 防红代码: ......

代码简介:

一个PHP屏蔽QQ内打开代码+消失的彩虹屏蔽腾讯检测代码二合一,看到很多人都比较喜欢这个,于是我就把这个发了出来。

防红代码:

<?php $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 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://cdn.u1.huluxia.com/g4/M02/5F/A1/rBAAdl7crWGAWhUeAABtVmN3384080.png" alt="" /> </div> </body> </html>'; exit; /* 反腾讯网址安全检测系统 Description:屏蔽腾讯电脑管家网址安全检测 Version:2.5 Author:消失的彩虹海 site:www.isiyuan.net */ 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('您当前浏览器不支持或操作系统语言设置非中文,无法访问本站!'); } }

使用教程:

01、创建PHP文件填写上方代码

02、使用PHP代码引用PHP文件

简约QQ防红跳转指引PHP代码分享

本文标签: QQ防红 PHP代码
版权声明:《 简约QQ防红跳转指引PHP代码分享 》为作者 思源哥哥原创文章,转载请注明原文地址!
免责声明:思源资源网提供的一切软件、教程和内容信息仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件(y#isiyuan.net)与我们联系处理。
本文地址:https://www.isiyuan.net/phpjc/13005.html
分享到:
打赏

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

评论 (0)