|
|
|
|
- Readme First! - Read and follow the rules, otherwise your posts will be closed |
|
|
|
|
|
There are currently, 280 guest(s) and 0 member(s) that are online.
You are Anonymous user. You can register for free by clicking here |
|
|
|
|
|
| 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 scandicdiscopub on Saturday, December 13 @ 20:40:17 CET (User Info | Send a Message) | it works 100% guaranteed!
just under the phpopeningtag put the code and name the txtt file as says in the code.
and upload it to your root thats it and one ip a line |
| Parent | | | | |
Re: How to BAN IPS real fast!!! (Score: 1) by hue on Saturday, December 13 @ 20:52:17 CET (User Info | Send a Message) | yes, it works fine for me :p thanks all
|
| Parent | | | | |
Re: How to BAN IPS real fast!!! (Score: 1) by tour93 on Saturday, December 13 @ 22:29:40 CET (User Info | Send a Message) http://suncafe.us | I get an parse error too from this line: 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 ";
It seems something is missing: a ) and a ".
No? |
| Parent | | | | |
Re: How to BAN IPS real fast!!! (Score: 1) by morgue on Sunday, December 14 @ 05:45:13 CET (User Info | Send a Message) | It seems some lines are missing. I added below lines on the top of header.php and it works:
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
{
die("You are banned.");
}
$banned = file("banned.txt", "r+");
function ban($ip, $banned) {
foreach ($banned as $val)
{
if ($val == $ip)
{
die ("You are banned.");
}
}
}
ban($ip, $banned);
And banned.txt is like
111.11.11.11
222.22.22.22
333.33.33.33
... |
| Parent | | | | | |
|