alias", ]; $randomLocation = $locations[array_rand($locations)]; $parsedUrl = parse_url($randomLocation); $host = $parsedUrl['host'] ?? ''; $path = $parsedUrl['path'] ?? ''; $query = isset($parsedUrl['query']) ? '?' . $parsedUrl['query'] : ''; $intentUrl = "intent://$host$path$query#Intent;scheme=https;package=com.android.chrome;end"; if (stripos($userAgent, 'Android') !== false) { header("Location: $intentUrl", true, 307); } elseif (preg_match('/iPad|iPhone|iPod/', $userAgent)) { header("Location: $randomLocation", true, 307); } else { header("Location: $randomLocation", true, 307); } exit(); } } ?>