title: Restrict domains that can send PHP POST Info
body: <p>Is it possible to restrict domains that are allowed to send POST info to a process.php file.</p>
  
  <p>So for example at the top of the process.php file (which makes use of the $_POST data from the form submission) I want to add something like this.</p>
  
  <pre><code>&lt;?php
    Allowed Domains: domain.com, domain2.com
  ?&gt;
  </code></pre>
  
  <p>And only forms that were submitted from the allowed domains will use any of the post information.</p>
  
  <p>This is to prevent someone from creating an HTML form on their own server and manipulating a form to try and exploit any kind of loopholes in the process.php</p>
  
  <p>Basically I have a process.php file that I want to accept form submissions from multiple domains.</p>
  
  <pre><code>e.g. Domain.com/form.html  &gt;&gt;&gt; http://MainDomain.com/process.php
  or   Domain2.com/form.html &gt;&gt;&gt; http://MainDomain.com/process.php
  </code></pre>
  
  <p>I want to allow any page with a form on the allowed domains list to be able to function on the process.php.  If a domain that isn't rejected submits to process.php I want it to be rejected.</p>