title: How to parse response headers in PHP?
body: <p>I have made an oauth signed request to a REST API and have the response headers in an array like so: </p>
  
  <pre><code>[0] =&gt; HTTP/1.1 200 OK
  [1] =&gt; Cache-Control: private
  [2] =&gt; Transfer-Encoding: chunked
  [3] =&gt; Content-Type: text/html; charset=utf-8
  [4] =&gt; Content-Location: https://***
  [5] =&gt; Server: Microsoft-IIS/7.0
  [6] =&gt; Set-Cookie: ASP.NET_SessionId=***; path=/; HttpOnly
  [7] =&gt; X-AspNetMvc-Version: 2.0
  [8] =&gt; oauth_token: ***
  [9] =&gt; oauth_token_secret: ***
  [10] =&gt; X-AspNet-Version: 4.0.30319
  [11] =&gt; X-Powered-By: ASP.NET
  [12] =&gt; Date: Sat, 15 Sep 2012 02:01:15 GMT
  </code></pre>
  
  <p>I am trying to figure out how to parse the headers for easy retrieval of items such as the HTTP status code, Content-Location, oauth_token, and oauth_token_secret?</p>