php防止刷新,流量攻击的一段代码
<?php
//查询禁止IP
$ip =$_SERVER['REMOTE_ADDR'];
$fileht=".htaccess2";
if(!file_exists($fileht))file_put_contents($fileht,"");
$filehtarr=@file($fileht);
if(in_array($ip."\r\n",$filehtarr))die("Warning:"."<br>"."Your IP address are forbided by some reason, IF you have any question Pls emill to shop@mydalle.com!");
//加入禁止IP
$time=time();
$fileforb;
file_put_contents($file,$str);
- 上一篇 »python渗透测试入门——流量嗅探器
- 下一篇 »linux下打印用户态段错误信息的一种方法