Reply to Ban IP Addresses

Your name:

Reply:


Posted by Andy on 09/18/05 21:42

Bellow is a script to ban spammers addresses who are using feedback form to
send spam. I am looking for a script , so I can get all senders IP
addresses. Your help will be appreciated.

And this is my script:

If you would like to ban certain IP addresses from submitting your form,
change "no" to "yes" below.
$ban_ip_on = "no";

IP addresses you would like to ban, seperated only by commas.
$ban_ip_list = "111.222.33.55,11.33.777.99";

Check If IP Address Is Banned.
if($ban_ip_on == "yes") {

if(strstr($ban_ip_list, $HTTP_SERVER_VARS[REMOTE_ADDR])) {
echo "<h2> Error - Banned IP</h2>
You cannot use this form because your IP address has been banned by the
administrator.<br>";
$error = "yes";
}
}


if($error == "yes") {
exit();
}

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация