25 lines
899 B
PHP
25 lines
899 B
PHP
<?php
|
|
$gif_files = glob($_SERVER['DOCUMENT_ROOT'] . '/assets/gifs/*.gif');
|
|
$gifs = array_map(fn($f) => '/assets/gifs/' . basename($f), $gif_files);
|
|
$random = !empty($gifs) ? $gifs[array_rand($gifs)] : '';
|
|
|
|
$base_url = 'https://sistav.com';
|
|
$gif_url = $base_url . $random;
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:url" content="<?= $base_url ?>/gif">
|
|
<meta property="og:image" content="<?= htmlspecialchars($gif_url) ?>">
|
|
<meta property="og:image:type" content="image/gif">
|
|
|
|
<!-- Twitter/Discord animated GIF support -->
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta name="twitter:image" content="<?= htmlspecialchars($gif_url) ?>">
|
|
|
|
<!-- Redirect real visitors to the homepage -->
|
|
<meta http-equiv="refresh" content="0; url=/">
|
|
</head>
|
|
<body></body>
|
|
</html>
|