title: PHP curl get outgoing headers
body: <p>Is it possible to get curl outgoing headers? So, for example:</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt( $ch, CURLOPT_URL, $host );
  curl_setopt( $ch, CURLOPT_HEADER, 1 );
  curl_setopt( $ch, CURLOPT_USERAGENT, $user_agent );
  curl_setopt( $ch, CURLOPT_REFERER, $referer );
  </code></pre>
  
  <p>IS it possible to call a function that lists all the headers prepared so far (host, user agent, referer)?</p>