mirror of
https://github.com/Anvilcraft/jensmemes
synced 2024-11-13 21:41:27 +01:00
13 lines
304 B
PHP
13 lines
304 B
PHP
|
<?php
|
||
|
$files = glob("images/*/*");
|
||
|
$random = rand(0, count($files) - 1);
|
||
|
$file = $files[$random];
|
||
|
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
||
|
if ($ext == "mp4") {
|
||
|
echo "<a href='$file'><video src='$file' controls ></video></a>";
|
||
|
} else {
|
||
|
echo "<a href='$file'><img src='$file' /></a>";
|
||
|
}
|
||
|
?>
|
||
|
|