This commit is contained in:
32
src/index.php
Normal file
32
src/index.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
$statusCodes = [
|
||||
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',
|
||||
];
|
||||
|
||||
$codes = array_keys($statusCodes);
|
||||
|
||||
$code = $codes[random_int(0, count($codes) - 1)];
|
||||
$codeString = $statusCodes[$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>
|
Reference in New Issue
Block a user