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