I have an array of IP addresses that I use with in_array to deny people in the following code.
$deny = array("111.222.333.444","999.555.444.222");
if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) {
header("location: http://google.com/");
exit();
}
Is there an alternative to in_array using a database. If I have a database of IP addresses how can I check the database for the IP address and redirect using the header?