Do you want an error page similar to the 404 error your webserver is giving?
This error you mean?
If so, here are 2 ways to achieve that:
1. Define all your pages in .htaccess file, then if that didn't qualify, htaccess automatically tell web server to show 404 error.
2. Trick your php to act like your webserver 404. For example this is the HTML code of your web server 404 page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DotRoll Kft. </title>
<link rel="stylesheet" href="/http-error/style.css" type="text/css"/>
</head>
<body>
<div class="upper"></div>
<div class="empty"><img src="/http-error/img/logo.jpg" width="329" height="89" /></div>
<div class="middle"><div class="info"><img src="/http-error/img/404.jpg" width="120" height="75" alt="404error" /></div>
<div class="info">
<p><strong> Az oldal nem található | Not found</strong></p>
</div>
</div>
<div class="empty"><p><br /></p><a href="/">Vissza a főoldalra</a></div>
<div class="footer"></div>
</body>
</html>
Now as Statik said, include the header and let the script die on this html:
header('HTTP/1.0 404 Not Found');
echo {desired htrml};
exit;