title: How to grab headers when cURLing a page
body: <p>I'm trying to curl a page (server.php) and send it three variables in a header ($webServiceId $hash and $timestamp), shown below. How can I grab the two variables out of the header in server.php so I can process them and send a response? I've tried googling and searching here, but I can't seem to find out how.</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_URL, 'server.php');
  curl_setopt($ch, CURLOPT_HTTPGET, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: URL-Encoded-API-Key {$webServiceId},{$hash},{$timestamp}"));
  $response = curl_exec($ch);
  curl_close ($ch);
  // dump response
  print_r( $response );
  </code></pre>
  
  <p>If server.php echos the headers its recieved back through the response, the print_r of $response yields:</p>
  
  <pre><code>HTTP/1.1 200 OK Date: Thu, 02 Aug 2012 22:18:59 GMT Server: LiteSpeed Connection: close X-Powered-By: PHP/5.3.14 Allow: GET
  </code></pre>
  
  <p>the Authorization: URL-Encoded-API-Key is't in there. Could I be setting up the curl header wrong?</p>