protected function getCurlOptions( $url, $full = false ) {
		$requestType = $this->getRequestType( $url );
		if ( $requestType == "MMS" ) {
			$url = str_ireplace( "mms://", "rtsp://", $url );
		}
		$options = [
			CURLOPT_URL => $url,
			CURLOPT_HEADER => 1,
			CURLOPT_RETURNTRANSFER => true,
			CURLOPT_AUTOREFERER => true,
			CURLOPT_FOLLOWLOCATION => true,
			CURLOPT_TIMEOUT => $this->curlTimeoutNoBody,
			CURLOPT_SSL_VERIFYPEER => false,
			CURLOPT_COOKIEJAR => sys_get_temp_dir() . "checkifdead.cookies.dat"
		];
		if ( $requestType == "RTSP" || $requestType == "MMS" ) {
			$header = [];
			$options[CURLOPT_USERAGENT] = $this->mediaAgent;
		} else {
			// Emulate a web browser request but make it accept more than a web browser
			$header = [
				// @codingStandardsIgnoreStart Line exceeds 100 characters
				'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
				// @codingStandardsIgnoreEnd
				'Cache-Control: max-age=0',
				'Connection: keep-alive',
				'Keep-Alive: 300',
				'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7',
				'Accept-Language: en-us,en;q=0.7,*;q=0.5',
				'Accept-Encoding: *',
				'Pragma: '
			];
			if ( $this->customUserAgent === false ) {
				$options[CURLOPT_USERAGENT] = $this->userAgent;
			} else {
				$options[CURLOPT_USERAGENT] = $this->customUserAgent;
			}
		}
		if ( $requestType == 'FTP' ) {
			$options[CURLOPT_FTP_USE_EPRT] = 1;
			$options[CURLOPT_FTP_USE_EPSV] = 1;
			$options[CURLOPT_FTPSSLAUTH] = CURLFTPAUTH_DEFAULT;
			$options[CURLOPT_FTP_FILEMETHOD] = CURLFTPMETHOD_SINGLECWD;
			if ( $full ) {
				// Set CURLOPT_USERPWD for anonymous FTP login
				$options[CURLOPT_USERPWD] = "anonymous:anonymous@domain.com";
			}
		}
		if ( $full ) {
			// Extend timeout since we are requesting the full body
			$options[CURLOPT_TIMEOUT] = $this->curlTimeoutFull;
			$options[CURLOPT_HTTPHEADER] = $header;
			if ( $requestType != "MMS" && $requestType != "RTSP" ) {
				$options[CURLOPT_ENCODING] = 'gzip,deflate';
			}
			$options[CURLOPT_USERAGENT] = $this->userAgent;
		} else {
			$options[CURLOPT_NOBODY] = 1;
		}

		return $options;
	}
protected function getCurlOptions( $url, $full = false ) {
		$requestType = $this->getRequestType( $url );
		if ( $requestType == "MMS" ) {
			$url = str_ireplace( "mms://", "rtsp://", $url );
		}
		$options = [
			CURLOPT_URL => $url,
			CURLOPT_HEADER => 1,
			CURLOPT_RETURNTRANSFER => true,
			CURLOPT_AUTOREFERER => true,
			CURLOPT_FOLLOWLOCATION => true,
			CURLOPT_TIMEOUT => $this->curlTimeoutNoBody,
			CURLOPT_SSL_VERIFYPEER => false,
			CURLOPT_COOKIEJAR => sys_get_temp_dir() . "checkifdead.cookies.dat"
		];
		if ( $requestType == "RTSP" || $requestType == "MMS" ) {
			$header = [];
			$options[CURLOPT_USERAGENT] = $this->mediaAgent;
		} else {
			// Emulate a web browser request but make it accept more than a web browser
			$header = [
				// @codingStandardsIgnoreStart Line exceeds 100 characters
				'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
				// @codingStandardsIgnoreEnd
				'Cache-Control: max-age=0',
				'Connection: keep-alive',
				'Keep-Alive: 300',
				'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7',
				'Accept-Language: en-us,en;q=0.7,*;q=0.5',
				'Accept-Encoding: *',
				'Pragma: '
			];
			if ( $this->customUserAgent === false ) {
				$options[CURLOPT_USERAGENT] = $this->userAgent;
			} else {
				$options[CURLOPT_USERAGENT] = $this->customUserAgent;
			}
		}
		if ( $requestType == 'FTP' ) {
			$options[CURLOPT_FTP_USE_EPRT] = 1;
			$options[CURLOPT_FTP_USE_EPSV] = 1;
			$options[CURLOPT_FTPSSLAUTH] = CURLFTPAUTH_DEFAULT;
			$options[CURLOPT_FTP_FILEMETHOD] = CURLFTPMETHOD_SINGLECWD;
			if ( $full ) {
				// Set CURLOPT_USERPWD for anonymous FTP login
				$options[CURLOPT_USERPWD] = "anonymous:anonymous@domain.com";
			}
		}
		if ( $full ) {
			// Extend timeout since we are requesting the full body
			$options[CURLOPT_TIMEOUT] = $this->curlTimeoutFull;
			$options[CURLOPT_HTTPHEADER] = $header;
			if ( $requestType != "MMS" && $requestType != "RTSP" ) {
				$options[CURLOPT_ENCODING] = 'gzip,deflate';
			}
			$options[CURLOPT_USERAGENT] = $this->userAgent;
		} else {
			$options[CURLOPT_NOBODY] = 1;
		}

		return $options;
	}
protected function getCurlOptions ( $ url , $ full = false ) { $ requestType = $ this -> getRequestType ( $ url ) ; if ( $ requestType == "MMS" ) { $ url = str_ireplace ( "mms://" , "rtsp://" , $ url ) ; } $ options = [ CURLOPT_URL => $ url , CURLOPT_HEADER => 1 , CURLOPT_RETURNTRANSFER => true , CURLOPT_AUTOREFERER => true , CURLOPT_FOLLOWLOCATION => true , CURLOPT_TIMEOUT => $ this -> curlTimeoutNoBody , CURLOPT_SSL_VERIFYPEER => false , CURLOPT_COOKIEJAR => sys_get_temp_dir ( ) . "checkifdead.cookies.dat" ] ; if ( $ requestType == "RTSP" || $ requestType == "MMS" ) { $ header = [ ] ; $ options [ CURLOPT_USERAGENT ] = $ this -> mediaAgent ; } else { // Emulate a web browser request but make it accept more than a web browser $ header = [ // @codingStandardsIgnoreStart Line exceeds 100 characters 'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5' , // @codingStandardsIgnoreEnd 'Cache-Control: max-age=0' , 'Connection: keep-alive' , 'Keep-Alive: 300' , 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7' , 'Accept-Language: en-us,en;q=0.7,*;q=0.5' , 'Accept-Encoding: *' , 'Pragma: ' ] ; if ( $ this -> customUserAgent === false ) { $ options [ CURLOPT_USERAGENT ] = $ this -> userAgent ; } else { $ options [ CURLOPT_USERAGENT ] = $ this -> customUserAgent ; } } if ( $ requestType == 'FTP' ) { $ options [ CURLOPT_FTP_USE_EPRT ] = 1 ; $ options [ CURLOPT_FTP_USE_EPSV ] = 1 ; $ options [ CURLOPT_FTPSSLAUTH ] = CURLFTPAUTH_DEFAULT ; $ options [ CURLOPT_FTP_FILEMETHOD ] = CURLFTPMETHOD_SINGLECWD ; if ( $ full ) { // Set CURLOPT_USERPWD for anonymous FTP login $ options [ CURLOPT_USERPWD ] = "anonymous:anonymous@domain.com" ; } } if ( $ full ) { // Extend timeout since we are requesting the full body $ options [ CURLOPT_TIMEOUT ] = $ this -> curlTimeoutFull ; $ options [ CURLOPT_HTTPHEADER ] = $ header ; if ( $ requestType != "MMS" && $ requestType != "RTSP" ) { $ options [ CURLOPT_ENCODING ] = 'gzip,deflate' ; } $ options [ CURLOPT_USERAGENT ] = $ this -> userAgent ; } else { $ options [ CURLOPT_NOBODY ] = 1 ; } return $ options ; }
Get CURL options

@param $url String URL we are testing against
@param bool $full Is this a request for the full page?
@return array Options for curl
Get CURL options