test 2
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
$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)];
|
||||||
|
|
||||||
|
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);
|
||||||
|
exit;
|
||||||
Reference in New Issue
Block a user