|
- Readme First! - Read and follow the rules, otherwise your posts will be closed |
|
|
|
|
|
There are currently, 167 guest(s) and 0 member(s) that are online.
You are Anonymous user. You can register for free by clicking here |
|
|
|
|
|
How to BAN IPS real fast!!! |
|
scandicdiscopub writes "Since they tried to hack me this morning and are trying ...
i made a banscript real fast ,if u need it just copy and paste the code below in your header.php
and make a txt file called banned.txt with an ip on each line.
so like
127.0.0.1
127.0.0.2
ok.
open header.php and all above just under the
paste this code:
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
elseif (isset($_SERVER['HTTP_VIA'])) {
$ip = $_SERVER['HTTP_VIA'];
}
elseif (isset($_SERVER['REMOTE_ADDR'])) {
$ip = $_SERVER['REMOTE_ADDR'];
}
else {
$ip = "Banned";
}
$banned = file("banned.txt", "r+");
$nbanned = count($banned);
function ban($ip, $banned, $nbanned){
for ($i = 0 ; $i You Have been banned from this portal, if you feel this is in error
please send email to you@yoursite.com ";
die();
}
}
}
ban($ip, $banned, $nbanned);
i m using it myself too at the moment!hehe
"
|
|
Posted on Saturday, December 13 @ 14:29:19 CET by Zhen-Xjell |
|
|
|
|
| |
|
Average Score: 5 Votes: 2

|
|
|
|
|
|
| The comments are owned by the poster. We aren't responsible for their content. |
| | | | |
No Comments Allowed for Anonymous, please register | | | | |
Re: How to BAN IPS real fast!!! (Score: 1) by XEULAS (MotherPlucker@KentuckyFriedChicken.com) on Saturday, December 13 @ 18:00:36 CET (User Info | Send a Message) http://www.SiteLance.com | I love the simplicity! Can you think of an easy way to automatically import the nukecops banlist each night?
Or even something like
$banned = file("http://nukecops.com/banned.txt", "r+");
|
| | | | |
Re: How to BAN IPS real fast!!! (Score: 1) by B-truE on Saturday, December 13 @ 20:04:36 CET (User Info | Send a Message) | Isn't it easier to disallow them in the .htaccess file?
Just wondering...
Thanks.
|
| | | | |
Re: How to BAN IPS real fast!!! (Score: 1) by CodyG on Saturday, December 13 @ 21:03:12 CET (User Info | Send a Message) | There are over 22,700 lines in the computercops ban list. If that file is called in myheader.php ... just how much longer will it take users to download any page on my nuke website? |
| | | | |
Re: How to BAN IPS real fast!!! (Score: 1) by tour93 on Saturday, December 13 @ 22:49:10 CET (User Info | Send a Message) http://suncafe.us | Hi,
Weblord.it has a banip module to download.
Just so you know. |
| | | | | |