Vấn đề bomb member bây giờ đang là 1 điều nhức nhối í với các webmaster khi các website liên tục bị bomb member làm MYSQL của server chạy rối loạn.
Download File anti flood này tại đây.
Cách sử dụng : Bạn unzip file này sẽ thấy folder antiFlood trong đó có 3 file : antiBomb.php , progbot.ttf , Register.php . Bây giờ bạn upload cả 3 file này vào thư mục sources của forum bạn .
Công việc còn lại là vào Admin Control Panel của Forum , sau đó bạn vào Board Settings và trong phần Enable Script/Bot Flood Control? bạn chọn None . Phần IF using GD; Use [YES] TTF method, or [NO] basic method? bạn chọn Yes.
Yêu cầu: Vbulletin tất cả các phiên bản từ 2.x.x trở lên.
1) Mở file "register.php" và:
Tìm dòng sau:
Mã lệnh (PHP) |
$homepage = trim($homepage);
if ($homepage) { if (preg_match('#^www\.#si', $homepage)) { $homepage = "http://$homepage"; } else if (!preg_match('#^[a-z0-9]+://#si', $homepage)) { // homepage doesn't match the http://-style format in the beginning -- possible attempted exploit $homepage = ''; } } |
Thêm vào:
Mã lệnh (PHP) |
// Image Validation, Added by Mitdac dot com.
if(strtolower($autovero) != strtolower($autoveri)){ eval("standarderror(\"".gettemplate("error_noval")."\");"); exit; } |
Tìm dòng:
Mã lệnh (PHP) |
// get extra profile fields |
Và sửa thành:
Mã lệnh (PHP) |
// Reg Verification, Added by Mitdac dot com
$image_var = randomstring(6); // get extra profile fields |
2) Vào ADMIN CP, chọn Modify Template, tìm template 'registeradult'.
Tìm dòng sau:
HTML |
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Enter Email Again:</b></normalfont></td> <td bgcolor="{secondaltcolor}"><normalfont><input type="text" class="bginput" name="emailconfirm" size="25" maxlength="50"></normalfont></td> </tr> |
Thêm:
HTML |
<tr>
<td bgcolor="{firstaltcolor}"><normalfont><b>Automatic Registration Prevention</b></normalfont><br> <smallfont>Please enter the text in the box below to the text box to the right. This is to prevent automatic registrations.<br><br><normalfont>$image_var</normalfont><br></smallfont></td> <td bgcolor="{firstaltcolor}"><normalfont> <input type="text" class="bginput" name="autoveri" size="25" maxlength="15"> <input type="hidden" name="autovero" value ="$image_var"> </normalfont></td> </tr> |
3) Tạo thêm 1 template "error_noval" với nội dung:
Trích dẫn |
Xin lỗi, bạn phải điền đúng số Security Number thì mới có thể hoàn thành việc đăng ký làm thành viên. Hãy quay lại và điền đúng thông tin. |
4) Mở file "admin/functions.php" , thêm đoạn code sau vào cuối file, trên thẻ ?>:
Mã lệnh (PHP) |
// ###################### Start randomstring, added by mitdac.com #######################
function randomstring($length){ $haystack = '01234567890abcdefghijklmnopqrstuvwxyz'; $needle =""; while(strlen($needle) < $length) { $needle .= substr($haystack,rand(0,strlen($haystack)),1); } return($needle); } |