function isiPad() { preg_match('/iPad/i', $_SERVER['HTTP_USER_AGENT'], $match); if (!empty($match)) { return true; } return false; }