protected function performFullRequest( $urls ) {
		// Create multiple curl handle
		$multicurl_resource = curl_multi_init();
		if ( $multicurl_resource === false ) {
			return false;
		}
		$curl_instances = [];
		$deadlinks = [];
		foreach ( $urls as $id => $url ) {
			$curl_instances[$id] = curl_init();
			if ( $curl_instances[$id] === false ) {
				return false;
			}
			// Get appropriate curl options
			curl_setopt_array(
				$curl_instances[$id],
				$this->getCurlOptions( $this->sanitizeURL( $url, false, true ), true )
			);
			// Add the instance handle
			curl_multi_add_handle( $multicurl_resource, $curl_instances[$id] );
		}
		// Let's do the CURL operations
		$active = null;
		do {
			$mrc = curl_multi_exec( $multicurl_resource, $active );
		} while ( $mrc == CURLM_CALL_MULTI_PERFORM );
		while ( $active && $mrc == CURLM_OK ) {
			if ( curl_multi_select( $multicurl_resource ) == -1 ) {
				// To prevent CPU spike
				usleep( 100 );
			}
			do {
				$mrc = curl_multi_exec( $multicurl_resource, $active );
			} while ( $mrc == CURLM_CALL_MULTI_PERFORM );
		}
		// Let's process our curl results and extract the useful information
		foreach ( $urls as $id => $url ) {
			$headers = curl_getinfo( $curl_instances[$id] );
			$error = curl_errno( $curl_instances[$id] );
			$errormsg = curl_error( $curl_instances[$id] );
			$curlInfo = [
				'http_code' => $headers['http_code'],
				'effective_url' => $headers['url'],
				'curl_error' => $error,
				'curl_error_msg' => $errormsg,
				'url' => $this->sanitizeURL( $url, false, true ),
				'rawurl' => $url
			];
			// Remove each of the individual handles
			curl_multi_remove_handle( $multicurl_resource, $curl_instances[$id] );
			$deadlinks[$url] = $this->processCurlResults( $curlInfo, true );
		}
		// Close resource
		curl_multi_close( $multicurl_resource );

		return $deadlinks;
	}
protected function performFullRequest( $urls ) {
		// Create multiple curl handle
		$multicurl_resource = curl_multi_init();
		if ( $multicurl_resource === false ) {
			return false;
		}
		$curl_instances = [];
		$deadlinks = [];
		foreach ( $urls as $id => $url ) {
			$curl_instances[$id] = curl_init();
			if ( $curl_instances[$id] === false ) {
				return false;
			}
			// Get appropriate curl options
			curl_setopt_array(
				$curl_instances[$id],
				$this->getCurlOptions( $this->sanitizeURL( $url, false, true ), true )
			);
			// Add the instance handle
			curl_multi_add_handle( $multicurl_resource, $curl_instances[$id] );
		}
		// Let's do the CURL operations
		$active = null;
		do {
			$mrc = curl_multi_exec( $multicurl_resource, $active );
		} while ( $mrc == CURLM_CALL_MULTI_PERFORM );
		while ( $active && $mrc == CURLM_OK ) {
			if ( curl_multi_select( $multicurl_resource ) == -1 ) {
				// To prevent CPU spike
				usleep( 100 );
			}
			do {
				$mrc = curl_multi_exec( $multicurl_resource, $active );
			} while ( $mrc == CURLM_CALL_MULTI_PERFORM );
		}
		// Let's process our curl results and extract the useful information
		foreach ( $urls as $id => $url ) {
			$headers = curl_getinfo( $curl_instances[$id] );
			$error = curl_errno( $curl_instances[$id] );
			$errormsg = curl_error( $curl_instances[$id] );
			$curlInfo = [
				'http_code' => $headers['http_code'],
				'effective_url' => $headers['url'],
				'curl_error' => $error,
				'curl_error_msg' => $errormsg,
				'url' => $this->sanitizeURL( $url, false, true ),
				'rawurl' => $url
			];
			// Remove each of the individual handles
			curl_multi_remove_handle( $multicurl_resource, $curl_instances[$id] );
			$deadlinks[$url] = $this->processCurlResults( $curlInfo, true );
		}
		// Close resource
		curl_multi_close( $multicurl_resource );

		return $deadlinks;
	}
protected function performFullRequest ( $ urls ) { // Create multiple curl handle $ multicurl_resource = curl_multi_init ( ) ; if ( $ multicurl_resource === false ) { return false ; } $ curl_instances = [ ] ; $ deadlinks = [ ] ; foreach ( $ urls as $ id => $ url ) { $ curl_instances [ $ id ] = curl_init ( ) ; if ( $ curl_instances [ $ id ] === false ) { return false ; } // Get appropriate curl options curl_setopt_array ( $ curl_instances [ $ id ] , $ this -> getCurlOptions ( $ this -> sanitizeURL ( $ url , false , true ) , true ) ) ; // Add the instance handle curl_multi_add_handle ( $ multicurl_resource , $ curl_instances [ $ id ] ) ; } // Let's do the CURL operations $ active = null ; do { $ mrc = curl_multi_exec ( $ multicurl_resource , $ active ) ; } while ( $ mrc == CURLM_CALL_MULTI_PERFORM ) ; while ( $ active && $ mrc == CURLM_OK ) { if ( curl_multi_select ( $ multicurl_resource ) == - 1 ) { // To prevent CPU spike usleep ( 100 ) ; } do { $ mrc = curl_multi_exec ( $ multicurl_resource , $ active ) ; } while ( $ mrc == CURLM_CALL_MULTI_PERFORM ) ; } // Let's process our curl results and extract the useful information foreach ( $ urls as $ id => $ url ) { $ headers = curl_getinfo ( $ curl_instances [ $ id ] ) ; $ error = curl_errno ( $ curl_instances [ $ id ] ) ; $ errormsg = curl_error ( $ curl_instances [ $ id ] ) ; $ curlInfo = [ 'http_code' => $ headers [ 'http_code' ] , 'effective_url' => $ headers [ 'url' ] , 'curl_error' => $ error , 'curl_error_msg' => $ errormsg , 'url' => $ this -> sanitizeURL ( $ url , false , true ) , 'rawurl' => $ url ] ; // Remove each of the individual handles curl_multi_remove_handle ( $ multicurl_resource , $ curl_instances [ $ id ] ) ; $ deadlinks [ $ url ] = $ this -> processCurlResults ( $ curlInfo , true ) ; } // Close resource curl_multi_close ( $ multicurl_resource ) ; return $ deadlinks ; }
Perform a complete text request, not just for headers

@param array $urls URLs we are checking
@return array with params 'error':curl error number and
'result':true(dead)/false(alive) for each element
Perform a complete text request not just for headers