|
#1
|
|||
|
|||
|
How to block IPs
need to block one or more IPs from visiting your pages?
surfing the web, I was able to find this hint: Code:
$addr = array("1.2.3.4", "1.2.3.5", "1.2.3.6"); // array of IPs..
foreach($addr AS $key=>$value)
if (strstr($_SERVER['REMOTE_ADDR'], $value))
{
Header("Location:www.yahoo.com");
}
error_reporting(0) in the /index.php file. I used it to block a static IP of a person I didn't want, and it works! others could find it useful to permanently block spammers, ex-girlfriends, and so on |
|
#2
|
|||
|
|||
|
I just wanted to add ex-boyfriends but I must admit that nearly 99,9% of my ex-boyfriends are computer-illiterate, even my beloved husband :lol:
|
|
#3
|
|||
|
|||
|
well, I did it for that reason, really :twisted:
now, when she visits my blog (if ever) she gets a wonderful http://steff.altervista.org/403.html anyway, joking apart, don't you think this can be useful to stop spam? |
|
#4
|
|||
|
|||
|
yes, it could be an addon
more and more this security topic is coming ahead, anti-comment-spam, anti-referrer-spam, blocking IP-adresses but I would be careful with blocking IP-adresses, I once used it in another script (like an online-lottery), and even participants who did not enter any answer before were blogged by the IP-list, were told they couldn't enter again.. there was the IP of one of the biggest providers in that IP-list ... how to take care of these adresses? most likely users will come with a dynamic adress ... |
| Post Reply |
| Thread Tools | |
|
|