

Detecting all major mobile devices in PHP, in 558 bytes - justindocanto
http://www.justindocanto.com/scripts/detect-a-mobile-device-in-php-using-detectmobiledevice

======
justindocanto
In case anybody is interested, on top of explaining the function the page also
lists ~30 tests/results against some of today’s commonly used gadgets and
their user-strings (iphone, ipad, hp phones, blackberrys, windows boxes
(98/XP/Vista/7), tmobile sidekick, palm devices,google nexux s, cricket phones
& more)

Hope somebody finds this useful. Appreciate any feedback. =)

~~~
justindocanto
A commenter on my site pointed out I could remove strotolower by adding case-
insensitivity to my preg_match. Don't know how I overlooked that. The code is
now even simpler at just 547 bytes, without being minified

------
johng
Pretty neat. Upvoted.

~~~
justindocanto
Thanks John!

