SuperForum
Mastalos este creatorul forumului
|
Nou pe simpatie: surender_lady din Arad
 | Femeie 25 ani Arad cauta Barbat 26 - 47 ani |
|
|
SuperForumInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
|
| #1 |
bogdanAdministrator
Postari: 60
|
|
Got a Flamer on your site or forums? Ban'em! I know alot of you guys already know how to do this but I thought I'd show everyone how to. Copy and paste one of the two codes below into a new document and call it ipbanned.php 1.Single IP Ban
php code
$bad_ip = 'xxx.xxx.xxx.xxx'; // the "x's" are where you put the ip of who you want to ban. $visitor_ip = $_SERVER['REMOTE_ADDR']; // the ip address of the visitor if($visitor_ip == $bad_ip) { die("Tsk, tsk, tsk you got banned!!" ; ** ?>
Is there more than 1 person you just hate. Well here is the script to ban multiple people.
php code
$ban_ips = "xxx.xxx.xxx.1,xxx.xxx.xxx.2" ; First ip goes before the comma, second goes after the comma. $visitor_ip = $_SERVER['REMOTE_ADDR']; $ip_list = explode(",", $ban_ips); foreach($ip_list as $ip) { if($visitor_ip == $ip) { die("Tsk, tsk, tsk you got banned!" ; ** ** ?>
Now, if you just want to ban them from one page of your site, put that code in there. But if u just hate them, and you dont want them to access anything, then save the above code as ipbanned.php and use the include php code to easily put it on every site. Now the person cant acsess the site anymore. Have Fun
|
|
| |
|