This commit is contained in:
root 2024-10-24 11:10:00 +00:00
parent 4460e5c2c3
commit ed48d61eda

View File

@ -1,18 +1,6 @@
<?php
$codes = [
204,
301,
400,
401,
402,
403,
404,
410,
423,
501,
];
$codes2string = [
$statusCodes = [
204 => 'No Content',
301 => 'Moved Permanently',
400 => 'Bad Request',
@ -25,12 +13,16 @@ $codes2string = [
501 => 'Not Implemented',
];
$codes = array_keys($statusCodes);
$code = $codes[random_int(0, count($codes) - 1)];
$codeString = $codes2string[$code];
$codeString = $statusCodes[$code];
$headline = $code.' '.$codeString;
http_response_code($code);
?>
<html>
<head><title><?= $headline ?></title></head>
<body>