title: how to remove previously set request header referer field from curl handle?
body: <p>First I initialize curl handle:</p>
  
  <pre><code>$ch = curl_init();
  </code></pre>
  
  <p>Next I set the url and referer headers:</p>
  
  <pre><code>curl_setopt($ch,CURLOPT_URL,$url);
  curl_setopt($ch,CURLOPT_REFERER,$referer);
  </code></pre>
  
  <p>And finally execute statement:</p>
  
  <pre><code>curl_exec($ch);
  </code></pre>
  
  <p>Now I can use another url without closing and reopening the handle, so:</p>
  
  <pre><code>curl_setopt($ch,CURLOPT_URL,$another_url);
  </code></pre>
  
  <p>And here headache begins, because I do not know how to disable referer header that would be send do server, of course I've tried to put <code>false</code> and <code>null</code> into CURLOPT_REFERER but it causes the referer field to be empty, that is a <code>Referer:</code> is still send to the server but with no value (is this even correct with http specs?).</p>
  
  <p>Is there any option to remove header altogether without closing and reinstantiating curl handle ?</p>
  
  <p>I'd like to avoid it because curl keeps a connection open for some time, if I would constantly close the handle while downloading from the same host it could take more time.</p>