title: How do I use cURL & PHP to spoof the referrer?
body: <p>I'm trying to learn cURL with PHP to spoof the referrer to a website.</p>
  
  <p>With the following script I expected to accomplish this...but it seems to not work.</p>
  
  <p>Any ideas/suggestion where I am going wrong??</p>
  
  <p>Or do you know of any tutorials that could help me figure this out?</p>
  
  <p>Thanks!</p>
  
  <p>Jessica</p>
  
  <pre><code>&lt;?php
  $host = "http://mysite.com";
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $host);
  curl_setopt($ch, CURLOPT_VERBOSE, 1);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_AUTOREFERER, false);
  curl_setopt($ch, CURLOPT_REFERER, "http://google.com");
  curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
  curl_setopt($ch, CURLOPT_HEADER, 0);
  $result = curl_exec($ch);
  curl_close($ch);
  ?&gt;
  </code></pre>