protected function parseHeader($curl, $header)
	{
		if (preg_match("/^([^:\s]+)\:\s+(.*)$/", $header, $matches))
		{
			// Add to header list
			$matches[2] = trim($matches[2]);
			$this->lastHeader[$matches[1]] = $matches[2];

			// Set result type
			$this->lastResultType = $matches[1] === "Content-Type" ? $matches[2] : $this->lastResultType;			
		}

		return strlen($header);
	}
protected function parseHeader($curl, $header)
	{
		if (preg_match("/^([^:\s]+)\:\s+(.*)$/", $header, $matches))
		{
			// Add to header list
			$matches[2] = trim($matches[2]);
			$this->lastHeader[$matches[1]] = $matches[2];

			// Set result type
			$this->lastResultType = $matches[1] === "Content-Type" ? $matches[2] : $this->lastResultType;			
		}

		return strlen($header);
	}
protected function parseHeader ( $ curl , $ header ) { if ( preg_match ( "/^([^:\s]+)\:\s+(.*)$/" , $ header , $ matches ) ) { // Add to header list $ matches [ 2 ] = trim ( $ matches [ 2 ] ) ; $ this -> lastHeader [ $ matches [ 1 ] ] = $ matches [ 2 ] ; // Set result type $ this -> lastResultType = $ matches [ 1 ] === "Content-Type" ? $ matches [ 2 ] : $ this -> lastResultType ; } return strlen ( $ header ) ; }
Parse header line

@param resource	$curl	curl resource
@param string	$header	header line

@return int
Parse header line