title: Getting the request headers send via file_get_contents()
body: <p>When using <code>file_get_contents()</code> to request an external URL, how can I find out what headers I've sent, or alternatively what headers I am about to send? I'm basically looking for a request counterpart for <code>$http_response_header</code> or anything else I can use to extract the same data.</p>
  
  <p>I know I get to set headers myself with <code>stream_context_create(array ('http' =&gt; array ('header' =&gt; $header)))</code>, but I want to see what headers are actually being sent in the end, including default ones.</p>