title: Avoid to access page from external network?
body: <p>I have created some php pages which show data from some excel files. </p>
  
  <p>I access those pages using internal IP address at the office where all PC's are connected on the same network. I access those pages from my home using external IP address. </p>
  
  <p>So my question is, how do I put a password or protect my php page access from external network?</p>
  
  <p>i.e. When I access php webpage from my home, it should ask for a password - how do I accomplish this?</p>
  
  <p>eg:        hello.php</p>
  
  <pre><code>&lt;?php
      echo"hello world";
  ?&gt;
  </code></pre>
  
  <p>I want to put password to this php file or if I access it using external ip address then it should ask for password.</p>