<?php
// Function to detect mobile devices
function isMobile() {
    return preg_match('/(android|iphone|ipad|ipod)/i', $_SERVER['HTTP_USER_AGENT']);
}

// Function to detect iOS devices
function isIOS() {
    return preg_match('/(iphone|ipad|ipod)/i', $_SERVER['HTTP_USER_AGENT']);
}

// Function to detect Android devices
function isAndroid() {
    return preg_match('/android/i', $_SERVER['HTTP_USER_AGENT']);
}

// Redirect based on device
if (isAndroid()) {
    header('Location: https://app.hotchops.in');
    exit;
} elseif (isIOS()) {
    header('Location: https://app.hotchops.in'); // Replace with your App Store URL
    exit;
} else {
    header('Location: https://app.hotchops.in');
    exit;
}
?>
