title: Sending referral url in curl
body: <p>What i want to do is that when the request is made from any server I want to get the referrer url so I can check if this url is allowed to access my file or not, I have some plugins and on update check on admin side they will check versions connecting my site. So, the plugins are registered with clients site. </p>
  
  <p>Here is my curl code sends referrer but I want to send referrer secretly so no one can change my code easily. </p>
  
  <pre><code>public function checkUpdate($task , $product) {
  
  $parameters = array(
                  'task' =&gt; $task,
                  'product' =&gt; $product,
                  'domain' =&gt; $_SERVER['HTTP_HOST']
              );
  
  
  $curl = curl_init();
  $parameters_str = '';
  
  $url = "http://example.com";
  
  foreach ($parameters as $key =&gt; $value) {
    $parameters_str .= "$key=$value&amp;";
  }
  
  $url .= "?$parameters_str";
  
  curl_setopt($curl, CURLOPT_URL, $url);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($curl, CURLOPT_REFERER, $_SERVER['HTTP_HOST']);
  
  $result = curl_exec($curl);
  curl_close($curl);
  
  return $result;
  }
  </code></pre>
  
  <p>I hope you understand me. Or if you have better solution to do this work like check license of my clients then it will be great!
  Please also let me know if you think the question is not good or not explaining well in comments.</p>
  
  <p>Thanks in advance.</p>