darkmagician
Feel the beat
HOME Wap tải Chat for teen FORUM
Time [01:53 ~ 30/08/26]
[BLOG|Báo lỗi]
Advertisment-nhà tài trợ
Code tự động lock ip khi bị ddos
Mã nguồn[chọn]:
<?php
$n = 5; // Chặn ip nếu 5 lần nhanh và liên tiếp truy cập vào 1 URL
$ban = strpos($_SERVER['REQUEST_URI'],"vbshout.php")?0:1;
$in = "
".$_SERVER['REMOTE_ADDR']." -".$_SERVER['REQUEST_URI'];
$log = fopen('banip.log','a'); fwrite($log, $in); fclose($log);
$list = file('banip.log',FILE_IGNORE_NEW_LINES |FILE_SKIP_EMPTY_LINES);
$last = count($list) - 1;
if($last >1000) { $in ="Deny from all"."
";
$lock = fopen('.htaccess','a'); fwrite($lock,$in); fclose($lock); }
elseif($last > $n) { for($i = 1; $i < $n;$i++)if($list[$last - $i] !=$list[$last]) $ban = 0;
} else { $ban = 0; }
if($ban) { $in ="Denyfrom".$_SERVER['REMOTE_ADDR']."
";
$lock = fopen('.htaccess','a'); fwrite($lock,$in); fclose($lock);}
?>
Các bạn save đoạn code trên lại thành banip.php. Sau đó đưa lên thư mục gốc của site.và add dòng
include ('banip.php');
Vào file muốn bảo vệ index chẳng hạn.
Chúc các bạn thành công !

↑Lên trên↑
Tags: darkmagican.xtgem.com/filewapmaster/kienthuclaptrinhwap/baomatwapsite/codelockipkhibiddos
Coolwa.tk/filewapmaster/kienthuclaptrinhwap/baomatwapsite/codelockipkhibiddos
SEO : Bạn đến từ :
Đám mây từ khoá: darkmagician,coolwa,cosplay japan,game guns online,12guns,12guns.vn,darkmagican,gameloft,game mod,game hack,game avatar,game army,game khi phach anh hung ,game sex,game hentai,game long tinh mod,truyen tranh sex,doremon che,hinh cosplay,hinh 18 ,blog,tao wap,code,wap hack,thủ thuật,báo lỗi,game team,ninja school online.
SEO
Free Backlink raovatdanang24h- SEO Google Backlinks BacklinkViet.blogspot.com Add Free BackLinkBacklinkviet - giokim.com Tăng Alexa |  Tăng Google Page Rank |  Auto Backlink | Tạo Backlink
0nline : 1
Hôm nay : 1
Tổng cộng : 82
FIND ME ON GOOGLE PLUS

Bản quyền thuộc về darkmagican.xtgem.com
Cám ơn các bạn đã ghé thăm !
Click ghé thăm trang chủ

Teya Salat