$sIps = "xx.xx.xx.xx,xxx.xx.xxx.xx,xxx.xxx.xxx.xxx"; $aIps = explode (",", $sIps); if (in_array ($_SERVER["REMOTE_ADDR"], $aIps)) { echo "You are banned."; die; }