added tips to lamer.bash help
[mirrors/Programs.git] / php / 404.php
... / ...
CommitLineData
1<?php
2 $request = $_SERVER['REDIRECT_URL'];
3 $host = $_SERVER['HTTP_HOST'];
4 $proto = 'http';
5 if(!(trim($_SERVER['HTTPS']) == '')) $proto = 'https';
6
7 if(!eregi('www\\.', $host)) {
8 header('Location: '.$proto.'://www.'.$host.$request);
9 }
10
11 $desc = trim(strtr($request, '/\\', ' '));
12 $url = $desc.' site:'.$host;
13 $cache_url = 'cache:'.$host.$request;
14
15 $desc = htmlspecialchars($url);
16 $cache_desc = htmlspecialchars($cache_url);
17
18 $url = urlencode($url);
19 $cache_url = urlencode($cache_url);
20
21 $request = htmlspecialchars($request);
22 $link = "<a href='http://google.com/search?q=$url'>$desc</a>";
23 $link_cache = "<a href='http://google.com/search?q=$cache_url'>$cache_desc</a>";
24?>
25<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
26<html><head>
27<title><?php echo($request); ?> - 404 Not Found</title>
28<link rel="stylesheet" href="/_common/harvie.css" type="text/css" />
29</head><body>
30<table border="0" style="width:100%;"><tr>
31 <td>
32 <h1>404 Not Found</h1>
33 <p>The requested URL <?php echo($request); ?> was not found on this server.</p>
34 <p>You can try to google it: <?php echo($link); ?>.</p>
35 <p>You can also try to lookup google cache: <?php echo($link_cache); ?>.</p>
36 <p>Or you can visit my <a href="http://blog.harvie.cz/">blog</a>.</p>
37 </td>
38 <td>
39 <h1>404 Nenalezeno</h1>
40 <p>Požadovaná URL <?php echo($request); ?> nebyla na tomto serveru nalezena.</p>
41 <p>Můžete ji zkusit vygooglovat: <?php echo($link); ?>.</p>
42 <p>Můžete ji zkusit najít v google archivu: <?php echo($link_cache); ?>.</p>
43 <p>Nebo můžete navštívit můj <a href="http://blog.harvie.cz/">blog</a>.</p>
44 </td>
45</tr></table>
46
47<div style="text-align:center;"><h1>Big Brother's watching...</h1><img src="http://narcism.harvie.cz/1.jpg" /><br /><img src="http://img389.imageshack.us/img389/9341/resistaneisfutilern5.jpg" /></div>
48<div style="text-align:right;"><pre>
49 \./
50 (o o)
51oOOo-(_)-oOOo</div></pre>
52<hr>
53<address><?php echo($_SERVER['SERVER_SIGNATURE']); ?></address>
54
55</body></html>
56
57
58
This page took 0.509156 seconds and 4 git commands to generate.