title: Throwing a 401 header with php without redirect
body: <p>I have a php function which adds bad IP's to a MySQL table.</p>
  
  <p>Each page on my site then checks the table and throws a HTTP 401 header if a match is found.</p>
  
  <pre><code>if(badCrawler()){
      header("HTTP/1.1 401 Unauthorized");
      header("Location: error401.php");
  }
  </code></pre>
  
  <p>Is it possible to do this without changing the url?</p>
  
  <p>Thanks</p>