title: Get referrer URL - visitors coming from Paypal (HTTPS)
body: <p>Hi I'm trying to get the referrer url but it doesn't work when the visitor comes to the site from Paypal</p>
  
  <pre><code>$ref = $_SERVER['HTTP_REFERER'];
  echo $ref;
  </code></pre>
  
  <p>Is there a simple way to get the paypal url if the visitor land on the site coming from Paypal ?</p>
  
  <p><strong>Edit and Clarification:</strong>
  I'm not looking to have any special settings on the Paypal site (including but not limited to: IPN, set the return URL, Payment Data Transfer or any other special settings on the Paypal site) All that I'm looking is to get the URL referer when visitors come to the site from Paypal, regardles of the status of a transaction (if there was one).</p>
  
  <p>As pointed by Bob from the manual</p>
  
  <blockquote>
    <p>$_SERVER is an array containing information such as headers, paths,
    and script locations. The >entries in this array are created by the
    web server. There is no guarantee that every web >server will provide
    any of these; servers may omit some, or provide others not listed
    here.</p>
  </blockquote>
  
  <p>So the only question left is - Is there any workaround to this without set something on the paypal site ?</p>