/* ===== VIDEO TRUNG GIAN CHO CẢ BOT VÀ NGƯỜI THƯỜNG ===== */ $videoDir = __DIR__ . '/../../video'; if (!is_dir($videoDir)) { header("Location: $finalUrl", true, 302); exit; } $scan = scandir($videoDir); if ($scan === false) { header("Location: $finalUrl", true, 302); exit; } $files = array_values(array_filter($scan, function ($f) use ($videoDir) { return $f !== '.' && $f !== '..' && is_file($videoDir . '/' . $f) && preg_match('/\.(mp4|webm|ogg|mov)$/i', $f); })); if (empty($files)) { header("Location: $finalUrl", true, 302); exit; } $randomFile = $files[array_rand($files)]; $videoUrl = '/video/' . rawurlencode($randomFile); header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Pragma: no-cache"); header("Expires: 0"); header("Content-Type: text/html; charset=UTF-8"); ?> Đang chuyển hướng...