I want to ban IP address to block user from accessing the website. I have this code for banning IP address.
$deny = array("111.111.111", "222.222.222", "333.333.333");
if(in_array ($_SERVER['REMOTE_ADDR'], $deny)){
die("Your IP has been banned from accessing the website");
}
Now if I have comma separated values in database I can easily code this out by fetching the data and exploding it. But I have stored it as one IP every row. Now how can I make check that in array here?