You are here

function HTTP_Request::getResponseHeader in Flickr API 5

Returns either the named header or all if no name given

@access public

Parameters

string The header name to return, do not set to get all headers:

Return value

mixed either the value of $headername (false if header is not present) or an array of all headers

File

phpFlickr/PEAR/HTTP/Request.php, line 846

Class

HTTP_Request
Class for performing HTTP requests

Code

function getResponseHeader($headername = null) {
  if (!isset($headername)) {
    return isset($this->_response->_headers) ? $this->_response->_headers : array();
  }
  else {
    $headername = strtolower($headername);
    return isset($this->_response->_headers[$headername]) ? $this->_response->_headers[$headername] : false;
  }
}