41 lines
695 B
PHP
41 lines
695 B
PHP
![]() |
<?php
|
||
|
$codes = [
|
||
|
204,
|
||
|
301,
|
||
|
400,
|
||
|
401,
|
||
|
402,
|
||
|
403,
|
||
|
404,
|
||
|
410,
|
||
|
423,
|
||
|
501,
|
||
|
];
|
||
|
|
||
|
$codes2string = [
|
||
|
204 => 'No Content',
|
||
|
301 => 'Moved Permanently',
|
||
|
400 => 'Bad Request',
|
||
|
401 => 'Unauthorized',
|
||
|
402 => 'Payment Required',
|
||
|
403 => 'Forbidden',
|
||
|
404 => 'Not Found',
|
||
|
410 => 'Gone',
|
||
|
423 => 'Locked',
|
||
|
501 => 'Not Implemented',
|
||
|
];
|
||
|
|
||
|
$code = $codes[random_int(0, count($codes) - 1)];
|
||
|
$codeString = $codes2string[$code];
|
||
|
$headline = $code.' '.$codeString;
|
||
|
|
||
|
http_response_code($code);
|
||
|
?>
|
||
|
<html>
|
||
|
<head><title><?= $headline ?></title></head>
|
||
|
<body>
|
||
|
<center><h1><?= $headline ?></h1></center>
|
||
|
<hr><center>Nestle Gmbh</center>
|
||
|
</body>
|
||
|
</html>
|