$browser = $_SERVER['HTTP_USER_AGENT']; if (strpos($browser , "iPad") or strpos($browser , "iPhone") or strpos($browser , "iPod")) { $idevice = "y"; } else { $idevice = "n"; } ?>