NYCPHP Meetup

NYPHP.org

[nycphp-talk] Mobile Phone Detection

John Campbell jcampbell1 at gmail.com
Fri May 1 13:28:48 EDT 2009


2009/5/1 Peter Sawczynec <ps at blu-studio.com>:
> I was wondering if anyone on the list has a favorite, most-bulletproof
> "User-Agent, CSS, browser sensing" strategy for sensing mobile phones
> and/or individual carrier mobile phone environments.
>
> I am interested in a combined JavaScript / CSS @media or even a PHP
> route.

Javascript won't work because so many mobile browsers don't turn js on
by default.
CSS - '@media handheld' doesn't work very well either.

Regex'ing the useragent string from php is the only method I found
that was reliable.

Regards,
John Campbell



More information about the talk mailing list