public function exceptionCheck($strIP) { $excepts = $this->except; $ip = explode('.',$strIP); foreach ($excepts as $exception) { $exception = explode('.',$exception); if ((count($exception)) == 4) { $count = 0; while ($count <= 3) { // wildcards: if ($exception[$count] != '*') { // if the two octects of the ips match, it is an exception: if ($exception[$count] == $ip[$count]) { return FALSE; } } $count = ($count + 1); } return TRUE; } } }