title: Custom 404 Error Page in PHP
body: <p>I am a novice in PHP, I hope you can help me with this problem.
  How can I create a custom 404 error page in PHP without going anywhere or redirect it to other page.</p>
  
  <p>Ex. <code>mysite.com/no-where</code></p>
  
  <p>The page <code>no-where</code> does not exists. I want to display a 404 error message with design on that URL.</p>
  
  <p>How can I get the current URL? I got an error on this. Coz I want to check the header if its 404.</p>
  
  <pre><code>$url = $_SERVER['REQUEST_URI'];
  $array = get_headers($url);
  $string = $array[0];
  if(strpos($string,"200")) {
      echo 'url exists';
  } else {
      echo 'url does not exist';
  }
  </code></pre>