wp/wp-includes/http.php
changeset 13 d255fe9cd479
parent 9 177826044cd9
child 16 a86126ab1dd4
equal deleted inserted replaced
12:d8a8807227e4 13:d255fe9cd479
   553 		if ( preg_match( '#^(([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)\.){3}([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)$#', $host ) ) {
   553 		if ( preg_match( '#^(([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)\.){3}([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)$#', $host ) ) {
   554 			$ip = $host;
   554 			$ip = $host;
   555 		} else {
   555 		} else {
   556 			$ip = gethostbyname( $host );
   556 			$ip = gethostbyname( $host );
   557 			if ( $ip === $host ) { // Error condition for gethostbyname()
   557 			if ( $ip === $host ) { // Error condition for gethostbyname()
   558 				$ip = false;
   558 				return false;
   559 			}
   559 			}
   560 		}
   560 		}
   561 		if ( $ip ) {
   561 		if ( $ip ) {
   562 			$parts = array_map( 'intval', explode( '.', $ip ) );
   562 			$parts = array_map( 'intval', explode( '.', $ip ) );
   563 			if ( 127 === $parts[0] || 10 === $parts[0] || 0 === $parts[0]
   563 			if ( 127 === $parts[0] || 10 === $parts[0] || 0 === $parts[0]