protected function processCurlResults( $curlInfo, $full = false ) {
		// Determine if we are using FTP or HTTP
		$requestType = $this->getRequestType( $curlInfo['url'] );
		// Get HTTP code returned
		$httpCode = $curlInfo['http_code'];
		// Get final URL
		$effectiveUrl = $curlInfo['effective_url'];
		// Clean final url, removing scheme, 'www', and trailing slash
		$effectiveUrlClean = $this->cleanURL( $effectiveUrl );
		// Get an array of possible root urls
		$possibleRoots = $this->getDomainRoots( $curlInfo['url'] );
		if ( $httpCode >= 400 && $httpCode < 600 ) {
			if ( $full ) {
				$this->errors[$curlInfo['rawurl']] = "RESPONSE CODE: $httpCode";

				return true;
			} else {
				// Some servers don't support NOBODY requests, so if an HTTP error code
				// is returned, we'll check the URL again with a full page request.
				return null;
			}
		}
		// Check for error messages in redirected URL string
		if ( strpos( $effectiveUrlClean, '/404.htm' ) !== false ||
			strpos( $effectiveUrlClean, '/404/' ) !== false ||
			stripos( $effectiveUrlClean, 'notfound' ) !== false
		) {
			if ( $full ) {
				$this->errors[$curlInfo['rawurl']] = "REDIRECT TO 404";

				return true;
			} else {
				// Some servers don't support NOBODY requests, so if redirect to a 404 page
				// is returned, we'll check the URL again with a full page request.
				return null;
			}
		}
		// Check if there was a redirect by comparing final URL with original URL
		if ( $effectiveUrlClean != $this->cleanURL( $curlInfo['url'] ) ) {
			// Check against possible roots
			foreach ( $possibleRoots as $root ) {
				// We found a match with final url and a possible root url
				if ( $root == $effectiveUrlClean ) {
					$this->errors[$curlInfo['rawurl']] = "REDIRECT TO ROOT";

					return true;
				}
			}
		}
		// If there was an error during the CURL process, check if the code
		// returned is a server side problem
		if ( in_array( $curlInfo['curl_error'], $this->curlErrorCodes ) ) {
			$this->errors[$curlInfo['rawurl']] =
				"Curl Error {$curlInfo['curl_error']}: {$curlInfo['curl_error_msg']}";

			return true;
		}
		if ( $httpCode === 0 ) {
			if ( $full ) {
				$this->errors[$curlInfo['rawurl']] = "NO RESPONSE FROM SERVER";

				return true;
			} else {
				// Some servers don't support NOBODY requests, so if redirect to a 404 page
				// is returned, we'll check the URL again with a full page request.
				return null;
			}
		}
		// Check for valid non-error codes for HTTP or FTP
		if ( $requestType != "FTP" && !in_array( $httpCode, $this->goodHttpCodes ) ) {
			$this->errors[$curlInfo['rawurl']] = "HTTP RESPONSE CODE: $httpCode";

			return true;
			// Check for valid non-error codes for FTP
		} elseif ( $requestType == "FTP" && !in_array( $httpCode, $this->goodFtpCodes ) ) {
			$this->errors[$curlInfo['rawurl']] = "FTP RESPONSE CODE: $httpCode";

			return true;
		}

		// Yay, the checks passed, and the site is alive.
		return false;
	}
protected function processCurlResults( $curlInfo, $full = false ) {
		// Determine if we are using FTP or HTTP
		$requestType = $this->getRequestType( $curlInfo['url'] );
		// Get HTTP code returned
		$httpCode = $curlInfo['http_code'];
		// Get final URL
		$effectiveUrl = $curlInfo['effective_url'];
		// Clean final url, removing scheme, 'www', and trailing slash
		$effectiveUrlClean = $this->cleanURL( $effectiveUrl );
		// Get an array of possible root urls
		$possibleRoots = $this->getDomainRoots( $curlInfo['url'] );
		if ( $httpCode >= 400 && $httpCode < 600 ) {
			if ( $full ) {
				$this->errors[$curlInfo['rawurl']] = "RESPONSE CODE: $httpCode";

				return true;
			} else {
				// Some servers don't support NOBODY requests, so if an HTTP error code
				// is returned, we'll check the URL again with a full page request.
				return null;
			}
		}
		// Check for error messages in redirected URL string
		if ( strpos( $effectiveUrlClean, '/404.htm' ) !== false ||
			strpos( $effectiveUrlClean, '/404/' ) !== false ||
			stripos( $effectiveUrlClean, 'notfound' ) !== false
		) {
			if ( $full ) {
				$this->errors[$curlInfo['rawurl']] = "REDIRECT TO 404";

				return true;
			} else {
				// Some servers don't support NOBODY requests, so if redirect to a 404 page
				// is returned, we'll check the URL again with a full page request.
				return null;
			}
		}
		// Check if there was a redirect by comparing final URL with original URL
		if ( $effectiveUrlClean != $this->cleanURL( $curlInfo['url'] ) ) {
			// Check against possible roots
			foreach ( $possibleRoots as $root ) {
				// We found a match with final url and a possible root url
				if ( $root == $effectiveUrlClean ) {
					$this->errors[$curlInfo['rawurl']] = "REDIRECT TO ROOT";

					return true;
				}
			}
		}
		// If there was an error during the CURL process, check if the code
		// returned is a server side problem
		if ( in_array( $curlInfo['curl_error'], $this->curlErrorCodes ) ) {
			$this->errors[$curlInfo['rawurl']] =
				"Curl Error {$curlInfo['curl_error']}: {$curlInfo['curl_error_msg']}";

			return true;
		}
		if ( $httpCode === 0 ) {
			if ( $full ) {
				$this->errors[$curlInfo['rawurl']] = "NO RESPONSE FROM SERVER";

				return true;
			} else {
				// Some servers don't support NOBODY requests, so if redirect to a 404 page
				// is returned, we'll check the URL again with a full page request.
				return null;
			}
		}
		// Check for valid non-error codes for HTTP or FTP
		if ( $requestType != "FTP" && !in_array( $httpCode, $this->goodHttpCodes ) ) {
			$this->errors[$curlInfo['rawurl']] = "HTTP RESPONSE CODE: $httpCode";

			return true;
			// Check for valid non-error codes for FTP
		} elseif ( $requestType == "FTP" && !in_array( $httpCode, $this->goodFtpCodes ) ) {
			$this->errors[$curlInfo['rawurl']] = "FTP RESPONSE CODE: $httpCode";

			return true;
		}

		// Yay, the checks passed, and the site is alive.
		return false;
	}
protected function processCurlResults ( $ curlInfo , $ full = false ) { // Determine if we are using FTP or HTTP $ requestType = $ this -> getRequestType ( $ curlInfo [ 'url' ] ) ; // Get HTTP code returned $ httpCode = $ curlInfo [ 'http_code' ] ; // Get final URL $ effectiveUrl = $ curlInfo [ 'effective_url' ] ; // Clean final url, removing scheme, 'www', and trailing slash $ effectiveUrlClean = $ this -> cleanURL ( $ effectiveUrl ) ; // Get an array of possible root urls $ possibleRoots = $ this -> getDomainRoots ( $ curlInfo [ 'url' ] ) ; if ( $ httpCode >= 400 && $ httpCode < 600 ) { if ( $ full ) { $ this -> errors [ $ curlInfo [ 'rawurl' ] ] = "RESPONSE CODE: $httpCode" ; return true ; } else { // Some servers don't support NOBODY requests, so if an HTTP error code // is returned, we'll check the URL again with a full page request. return null ; } } // Check for error messages in redirected URL string if ( strpos ( $ effectiveUrlClean , '/404.htm' ) !== false || strpos ( $ effectiveUrlClean , '/404/' ) !== false || stripos ( $ effectiveUrlClean , 'notfound' ) !== false ) { if ( $ full ) { $ this -> errors [ $ curlInfo [ 'rawurl' ] ] = "REDIRECT TO 404" ; return true ; } else { // Some servers don't support NOBODY requests, so if redirect to a 404 page // is returned, we'll check the URL again with a full page request. return null ; } } // Check if there was a redirect by comparing final URL with original URL if ( $ effectiveUrlClean != $ this -> cleanURL ( $ curlInfo [ 'url' ] ) ) { // Check against possible roots foreach ( $ possibleRoots as $ root ) { // We found a match with final url and a possible root url if ( $ root == $ effectiveUrlClean ) { $ this -> errors [ $ curlInfo [ 'rawurl' ] ] = "REDIRECT TO ROOT" ; return true ; } } } // If there was an error during the CURL process, check if the code // returned is a server side problem if ( in_array ( $ curlInfo [ 'curl_error' ] , $ this -> curlErrorCodes ) ) { $ this -> errors [ $ curlInfo [ 'rawurl' ] ] = "Curl Error {$curlInfo['curl_error']}: {$curlInfo['curl_error_msg']}" ; return true ; } if ( $ httpCode === 0 ) { if ( $ full ) { $ this -> errors [ $ curlInfo [ 'rawurl' ] ] = "NO RESPONSE FROM SERVER" ; return true ; } else { // Some servers don't support NOBODY requests, so if redirect to a 404 page // is returned, we'll check the URL again with a full page request. return null ; } } // Check for valid non-error codes for HTTP or FTP if ( $ requestType != "FTP" && ! in_array ( $ httpCode , $ this -> goodHttpCodes ) ) { $ this -> errors [ $ curlInfo [ 'rawurl' ] ] = "HTTP RESPONSE CODE: $httpCode" ; return true ; // Check for valid non-error codes for FTP } elseif ( $ requestType == "FTP" && ! in_array ( $ httpCode , $ this -> goodFtpCodes ) ) { $ this -> errors [ $ curlInfo [ 'rawurl' ] ] = "FTP RESPONSE CODE: $httpCode" ; return true ; } // Yay, the checks passed, and the site is alive. return false ; }
Process the returned headers

@param array $curlInfo Array with values: returned headers, error number, URL checked for
@param bool $full Was this a request for the full page?
@return bool|null Returns true if dead, false if alive, null if uncertain
Process the returned headers