Update gif.php

This commit is contained in:
2026-02-22 15:20:57 -05:00
parent 9245296733
commit bf599f8e6d
+2 -5
View File
@@ -2,11 +2,8 @@
$gif_files = glob($_SERVER['DOCUMENT_ROOT'] . '/assets/gifs/*.gif');
if (empty($gif_files)) { http_response_code(404); exit; }
$file = $gif_files[array_rand($gif_files)];
$file = basename($gif_files[array_rand($gif_files)]);
header('Content-Type: image/gif');
header('Content-Length: ' . filesize($file));
header('Content-Disposition: inline; filename="gif.gif"');
header('Cache-Control: no-store, no-cache, must-revalidate');
readfile($file);
header('Location: /assets/gifs/' . rawurlencode($file), true, 302);
exit;