All pastes #353723 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-02-13 15:22 UTC
rendered paste body
	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;
				
			}
		}
          }