title: Secure Php execution on server
body: <p>I have a php script which updates a database. I want to be sure that no one else can call my script remotely and execute it.</p>
  
  <p>I tried this code but it did not work, the refer was always empty because I use https connection. </p>
  
  <pre><code>if (strpos($_SERVER['HTTPS_REFERER'], 'linkedfilm.com') == false) 
  {
      exit();
  }
  </code></pre>
  
  <p>The server is Apache server.</p>
  
  <p>Thanks.</p>