I have a contact form on my website that is rather exploitable, I've implemented the below code into the page as a means of stopping spammers (incoming mail includes the senders IP), but it's a pain to add new bans.
<?php
$banned = array("70.248.51.77", "75.156.110.47");
if (in_array($_SERVER['REMOTE_ADDR'], $banned)) {
header( 'Location: banned.html' ) ;
exit;
}
?>
What I would really like is a form in which I can easily add/remove bans to this script. Can anyone help me with this?