| 1234567891011121314151617 |
- <?php
- namespace App;
- class Http {
- public static function redirect(string $url, int $response_code = 303): void {
- http_response_code($response_code);
- header("Location: $url");
- exit();
- }
- public static function referer(): ?string {
- return $_SERVER["HTTP_REFERER"] ?? null;
- }
- }
|