mirror of
https://github.com/sigmasternchen/drnk.me
synced 2025-03-15 09:48:54 +00:00
17 lines
No EOL
365 B
PHP
17 lines
No EOL
365 B
PHP
<?php
|
|
|
|
function redirect(string $url) {
|
|
header("Location: " . $url, true, 302);
|
|
}
|
|
|
|
function setStatusCode(int $status) {
|
|
header("HTTP/", true, $status);
|
|
}
|
|
|
|
function errorResponse(string $error, string $description) {
|
|
return [
|
|
"error" => $error,
|
|
"description" => $description,
|
|
"timestamp" => (new DateTime())->format("c")
|
|
];
|
|
} |