title: PHP Allow access to specific referrer url/page only
body: <p>So my question is simple ive used the following method for allowing access to the php script via the referrer's domain name but i want to allow access for only referrers matching the full url.</p>
  
  <pre><code>&lt;?php
  if (isset($_SERVER['HTTP_REFERER']) &amp;&amp; $_SERVER['HTTP_REFERER'] != 'domain.com')
  {
  echo "Eexcuting code here";
  } else {
  echo('Hot Linking Not Permitted');
  // display some message / image / video
  exit;
  }
  ?&gt;
  </code></pre>
  
  <p>So if the referrer url matches <a href="http://www.domain.com/page.html" rel="noreferrer">http://www.domain.com/page.html</a> then allow access else if block it.</p>