| <?php | |
| $browser = $_SERVER['HTTP_USER_AGENT']; | |
| if (strpos($browser, "Jakarta") !== FALSE | |
| || strpos($browser, "Java/") !== FALSE | |
| || strpos($browser, "Slurp/") !== FALSE | |
| || strpos($browser, "msnbot/") !== FALSE | |
| || strpos($browser, "Googlebot/") !== FALSE | |
| || strpos($browser, "apacheHttpClient") !== FALSE | |
| || strpos($browser, "Baiduspider") !== FALSE | |
| || strpos($browser, "Apache-Maven/") !== FALSE | |
| ) { | |
| echo "404 Not Found"; | |
| } | |
| else { | |
| $html = file_get_contents("404.html"); | |
| echo $html; | |
| } |