亚洲啪啪,国产精品AV女教师蜜臀 ,亚洲操逼大片,国产亚洲精品无毛嫩逼喷水

中山php|最優(yōu)網(wǎng)絡(luò)中山做網(wǎng)站 中山php建站

最優(yōu)良人

2013/03/29 at 18:55

php防止刷流量攻擊

<?php
//查詢(xún)禁止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();
$fileforbid="log/forbidchk.dat";
if(file_exists($fileforbid))
{ if($time-filemtime($fileforbid)>60)unlink($fileforbid);
else{
$fileforbidarr=@file($fileforbid);
if($ip==substr($fileforbidarr[0],0,strlen($ip)))
{
if($time-substr($fileforbidarr[1],0,strlen($time))>600)unlink($fileforbid);
elseif($fileforbidarr[2]>600){file_put_contents($fileht,$ip."\r\n",FILE_APPEND);unlink($fileforbid);}
else{$fileforbidarr[2]++;file_put_contents($fileforbid,$fileforbidarr);}
}
}
}
//防刷新
$str="";
$file="log/ipdate.dat";
if(!file_exists("log")&&!is_dir("log"))mkdir("log",0777);
if(!file_exists($file))file_put_contents($file,"");
$allowTime = 120;//防刷新時(shí)間
$allowNum=10;//防刷新次數(shù)
$uri=$_SERVER['REQUEST_URI'];
$checkip=md5($ip);
$checkuri=md5($uri);
$yesno=true;
$ipdate=@file($file);
foreach($ipdate as $k=>$v)
{ $iptem=substr($v,0,32);
$uritem=substr($v,32,32);
$timetem=substr($v,64,10);
$numtem=substr($v,74);
if($time-$timetem<$allowTime){
if($iptem!=$checkip)$str.=$v;
else{
$yesno=false;
if($uritem!=$checkuri)$str.=$iptem.$checkuri.$time."1\r\n";
elseif($numtem<$allowNum)$str.=$iptem.$uritem.$timetem.($numtem+1)."\r\n";
else
{
if(!file_exists($fileforbid)){$addforbidarr=array($ip."\r\n",time()."\r\n",1);file_put_contents($fileforbid,$addforbidarr);}
file_put_contents("log/forbided_ip.log",$ip."--".date("Y-m-d H:i:s",time())."--".$uri."\r\n",FILE_APPEND);
$timepass=$timetem+$allowTime-$time;
die("Warning:"."<br>"."Sorry,you are forbided by refreshing frequently too much, Pls wait for ".$timepass." seconds to continue!");
}
}
}
}
if($yesno) $str.=$checkip.$checkuri.$time."1\r\n";
file_put_contents($file,$str);

-
国产精品最新| 韩日生活片麻豆| 国产福利片一区二区三区四区| 久久久精国精产999伊人精品| 国产性感美女黄色片| 99久久日本精品| 女色色综合网| 国产美女裸永久免费| 本庄优花の中文字幕| 日b祝频网站| 操吊妞| 天堂九九九无码| 嗯嗯啊免费| hd国产日本欧美韩国| 免费的性生活精品区| 久久久旡码一区二区| 黄色AV中文字幕久久| 国产欧美日韩台成人夫妻性生活| 国产AV 无码 乱噜噜| 这只有精品| 日本A片大鸡巴视频| 精品欧美一页| 欧美日韩九| 人妻少妇亚洲婷婷| 午夜三级生活片| 啊,啊好疼视频| 色哟哟一区二区三区在线观看| 欧美爱射射| 久久三级久| 99精品福利视| 国产AV无码精品色午夜| 久久理论电影中文字幕| 一本到人妻| @五月丁香啪啪啪| 蜜臀传媒在线| 国产97人人超碰| 免费无码人妻AV片在线在线播放| 免费的午夜福利专区| 久久久91人妻无码精品网| 欧美成日韩-区二区| 1区二区男人综合|