title: How to pass custom header to RESTful call?
body: <p>There are some web service APIs that I need to connect to for my website. Most of the APIs involve something like this:</p>
  
  <pre><code>$data = file_get_contents("http://www.someservice.com/api/fetch?key=1234567890
  </code></pre>
  
  <p>But one web service requires the API key to be set in a custom HTTP header. How do I make the request to this API url and pass the custom header at the same time?</p>