(/webkit/i).test(navigator.appVersion)
(/firefox/i).test(navigator.userAgent)
(/android/gi).test(navigator.appVersion)
(/iphone|ipad/gi).test(navigator.appVersion)
(/playbook/gi).test(navigator.appVersion)
PHP
(bool)strpos($_SERVER[‘HTTP_USER_AGENT’],’iPad’)