title: Php, get the referer from an ajax request
body: <p>I need to get the full domain in which the user sent the ajax request to my server, and it should be somewhat secure.
  The </p>
  
  <pre><code>$_SERVER['HTTP_REFERER']
  </code></pre>
  
  <p>Returns blank.
  What function should I use?
  Thanks in advance.</p>