Is there a good way to identify a cell phone or any other mobile device (which may be subject to a limited data plan) through the user agent or similar, easily accessible methods?
A:
You'd want to look in the User Agent for specific browsers and keywords like 'Mobile', 'Skyfire', etc. That should be a pretty reliable way. You'd want to do a Google Search for Mobile Browser UserAgents. Someone probably has made a list.
Chacha102
2009-07-31 06:13:08
+2
A:
Yes: WURFL, the Wireless Universal Resource File: "The WURFL is an XML configuration file which contains information about capabilities and features of many mobile devices."
RichieHindle
2009-07-31 06:13:40
I used the information from this file to generate a series of stripos() and preg_match() calls.
Shadow
2009-07-31 07:23:22
A:
I think you cannot be certain of the exact phone used in many cases because many phones share the same user-agent string (and even use the same browser). BUt you can certainly narrow the possible candidates enough as to serve tailored content.
Check these related questions as well
Vinko Vrsalovic
2009-07-31 06:13:43
I misinterpreted your "identify a cell phone" sentence then. Still you have to check for all the possible UAs, you cannot do it reliably in a single check (unless you build a monster regex)
Vinko Vrsalovic
2009-07-31 06:33:57