I used to use the function below for an array or IP's but now I have changes the IP array from this:
$bannedIPs = array('127.0.0.0','72.189.218.85'); // Banned IPs array
ipban($bannedIPs);
function ipban($bannedIPs) {
if (in_array($_SERVER['REMOTE_ADDR'], $bannedIPs)) {
include ("site_banip.php");
session_destroy();
exit;
}
}
to this:
$config_item['bannedIPs'] = array('127.0.0.0','72.189.218.85'); // Banned IPs array
ipban($config_item['bannedIPs']);
function ipban($bannedIPs) {
if (in_array($_SERVER['REMOTE_ADDR'], $bannedIPs)) {
include ("site_banip.php");
session_destroy();
exit;
}
}
Now I cannot get it to work though,
Warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\webserver\htdocs\includes\functions.inc.php on line 948
Is it possible to do what I am trying to do?