-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTTP_ERROR.php
More file actions
45 lines (45 loc) · 1.82 KB
/
Copy pathHTTP_ERROR.php
File metadata and controls
45 lines (45 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
$Date = date("d/m/Y h:i:s A T");
$Region = date("e");
$UserIP = $_SERVER['REMOTE_ADDR'];
$Admin = $_SERVER['SERVER_ADMIN'];
$Signature = $_SERVER['SERVER_SIGNATURE'];
if (isset($_SERVER['REDIRECT_STATUS'])) {
$ResponseCode = $_SERVER['REDIRECT_STATUS'];
} else {
$ResponseCode = http_response_code();
}
require 'Codes.php';
if (isset($ErrorCodes[$ResponseCode])) {
$ErrorTitle = $ErrorCodes[$ResponseCode][0];
$ErrorMessage = $ErrorCodes[$ResponseCode][1];
} else {
$ErrorTitle="Unknown Error!";
$ErrorMessage="An unknown error has occurred.";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<base href="/SVR_ERROR/">
<link rel="stylesheet" href="CSS/Main.min.css">
<!-- <link rel="stylesheet" href="CSS/Light.min.css"> -->
<link rel="stylesheet" href="CSS/Dark.min.css">
<title><?php echo $ErrorTitle; ?></title>
</head>
<body>
<div id="Container">
<div class="swing">
<h1><?php echo $ErrorTitle; ?></h1>
<h2 id='Error'>Error <?php echo $ResponseCode; ?></h2>
<section>
<h3>Just in case you were wondering...</h3>
<p><?php echo $ErrorMessage; ?><br><br>If you think this is a server error, please contact the server Admin using the link below.</p>
</section>
<p id="info"><?php echo $Date; ?> • <?php echo $Region; ?> • Your IP <?php echo $UserIP; ?> • <a href="mailto:<?php echo $Admin; ?>?subject=<?php echo rawurlencode("Error " . $ResponseCode . " @ " . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) ?>">Contact Server Admin</a></p>
</div>
</div>
<footer><?php echo $Signature; ?><p id='Copyright'>Copyright © <?php echo date('Y'); ?> Darnel-K</p></footer>
</body>
</html>