Hi everyone! I am having a problem with a bot that is spamming my blog comments tons through a static ip address on a daily basis. My blog is through Wordpress. I do have it set for this static ip to be put in the spam bin anything its posts which does work, but I would also like to block this static IP from even accessing my site. I am using php, not htaccess as it is not supported through my web hosting. Anyone have a php script that blocks static ips? I do have a script but it only block regular ip addresses. Here is the script I am currently using: <?php $deny = array("88.198.53.43", "static.88-198-53-43.clients.your-server.de"); if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) { header("location: http://www.google.com/"); exit(); } ?> As you can see, I entered the troublemaker's ip and static ip in the script, but it isn't blocking them from my site, any suggestions please? I am a U.S. site, I would consider blocking all of .de ips if you know how to do that too. Thanks in advance!
The easiest way is to complain to your web hosting provider and have them block this static IP through IP tables.
If you have hosting with cPanel, you can use IP Deny Manager and just block this IP from accessing all your websites(easiest and safetests). Next thing I can suggest you is to install SpamKarma plugin for wordpress, as it has it's own IP blacklist for comments.
Thanks for the replies! I went to my cPanel and found an option to block ips. I added the ip address, I hope it covers the full static address too. I hope it works! I will know soon when they try to repost. Thanks for the tips!