Detect Mobile Safari with PHP
Posted on Friday, May 11th (1776 days ago)
It’s really easy to detect mobile Safari with PHP:
$isMobileSafari = preg_match('/(iPod|iPhone|iPad)/', $_SERVER['HTTP_USER_AGENT']);
The variable is TRUE is it’s mobile Safari on an iPod, iPhone or iPad, FALSE otherwise.
About Joseph R. B. Taylor
Joseph R. B. Taylor is a designer/developer who makes stuff for screens of all shapes and sizes. He currently works at Edvisors, Inc. where he creates screen-based experiences for used by millions of college students every year.