Loading... > cc.php 也就是主要检测文件代码 <?php //代理IP直接退出 emptyempty($_SERVER['HTTP_VIA']) or exit('Access Denied'); //防止快速刷新 session_start(); $seconds = '3'; //时间段[秒] $refresh = '8'; //刷新次数 //设置监控变量 $cur_time = time(); if(isset($_SESSION['last_time'])){ $_SESSION['refresh_times'] += 1; }else{ $_SESSION['refresh_times'] = 1; $_SESSION['last_time'] = $cur_time; } //处理监控结果 if($cur_time - $_SESSION['last_time'] < $seconds){ if($_SESSION['refresh_times'] >= $refresh){ //跳转防cc页 header(sprintf('Location:%s', './cc.html')); exit('Access Denied'); } }else{ $_SESSION['refresh_times'] = 0; $_SESSION['last_time'] = $cur_time; } ?> ---------- > cc.html 也就是跳转界面 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>防CC刷新攻击中,5秒后跳转首页</title> <meta http-equiv="refresh" content="5;url=/" /> <style>*{box-sizing:inherit;}body{min-height:100vh;display:flex;justify-content:center;align-items:center;background:#151924;padding:0;margin:0;}.loading{--color:#F5F9FF;--duration:2000ms;font-family:Roboto,Arial;font-size:24px;position:relative;white-space:nowrap;user-select:none;color:var(--color);}.loading span{--x:0;--y:0;--move-y:0;--move-y-s:0;--delay:0ms;display:block;position:absolute;top:0;left:0;width:1px;text-indent:calc(var(--x) * -1);overflow:hidden;transform:translate(var(--x),var(--y));}.loading.start div{opacity:0;}.loading.start span{animation:move var(--duration) ease-in-out var(--delay);}@keyframes move{30%{transform:translate(var(--x),var(--move-y));}82%{transform:translate(var(--x),var(--move-y-s));}</style> </head> <body> <div class="loading">防CC刷新攻击中,5秒后跳转首页</div><br> <script src="https://cdn.bootcss.com/jquery/3.3.0/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){let loading=$('.loading').wrapInner('<div></div>'),min=20,max=70,minMove=10,maxMove=20;startAnimation(loading);loading.on('animationend webkitAnimationEnd oAnimationEnd','span:last-child',e=>{startAnimation(loading)});function setCSSVars(elem,min,max,minMove,maxMove){let width=Math.ceil(elem.width()),text=elem.text();for(let i=1;i<width;i++){let num=Math.floor(Math.random()*(max-min+1))+min,numMove=Math.floor(Math.random()*(maxMove-minMove+1))+minMove,dir=(i%2==0)?1:-1,spanCurrent=elem.find('span:eq('+i+')'),span=spanCurrent.length?spanCurrent:$('<span />');span.css({'--x':i-1+'px','--move-y':num*dir+'px','--move-y-s':((i%2==0)?num*dir-numMove:num*dir+numMove)+'px','--delay':i*10+'ms'});if(!spanCurrent.length){elem.append(span.text(text))}}}function startAnimation(elem){elem.removeClass('start');setCSSVars(elem,min,max,minMove,maxMove);void elem[0].offsetWidth;elem.addClass('start')}}); </script> </body> </html> ---------- > 最后调用cc.php文件,放入全局文件或首页文件即可 require 'cc.php';<hr class="content-Ideal" style="margin-top:50px" /><blockquote class="content-Ideal" style="font-style:normal"><p class="content-Ideal">版权属于:苏安吖</p><p class="content-Ideal">本文链接:<a class="content-Ideal" href="https://ipayy.net/web/24.html">https://ipayy.net/web/24.html</a></p><p class="content-Ideal">转载时须注明出处及本声明</p></blockquote> Last modification:February 3rd, 2020 at 10:56 pm © 允许规范转载 Support 嘤嘤嘤,来打赏点吧ε٩(๑> ₃ <)۶ з ×Close Appreciate the author Sweeping payments Pay by AliPay Pay by WeChat