9 lines
324 B
PHP
9 lines
324 B
PHP
<?php
|
|
$gif_files = glob($_SERVER['DOCUMENT_ROOT'] . '/assets/gifs/*.gif');
|
|
if (empty($gif_files)) { http_response_code(404); exit; }
|
|
|
|
$file = basename($gif_files[array_rand($gif_files)]);
|
|
|
|
header('Cache-Control: no-store, no-cache, must-revalidate');
|
|
header('Location: /assets/gifs/' . rawurlencode($file), true, 302);
|
|
exit; |