Guest User

unnecessary

a guest
Dec 29th, 2011
25
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2. <!--
  3. function returnStatus(req, status) {
  4.   //console.log(req);
  5.   if(status == 200) {
  6.     document.write("<h1>HTTP Error 418: I'm a teapot</h1>")
  7.   }
  8.   else {
  9.     document.write("")
  10.  }
  11. }
  12.  
  13. function fetchStatus(address) {
  14.  var client = new XMLHttpRequest();
  15.  client.onreadystatechange = function() {
  16.   // in case of network errors this might not give reliable results
  17.   if(this.readyState == 4)
  18.    returnStatus(this, this.status);
  19.  }
  20.  client.open("HEAD", address);
  21.  client.send();
  22. }
  23. -->
RAW Paste Data