Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Portables

Journal gbulmash's Journal: Detecting Mobile Browsers

When I went to find out how to detect mobile browsers, I found out it wasn't simple or trivial. After looking at a number of scripts and a couple big lists of User Agent strings, I put together a free PHP script for detecting mobile browsers. It seems to do very well (no false positives on all 63 desktop browser versions tracked by BrowserCam, caught all the mobiles I've thrown at it so far), yet the code is very compact and easy to follow. There's also a quickie mobile browser detector using the code... if you want to see it in action.
This discussion has been archived. No new comments can be posted.

Detecting Mobile Browsers

Comments Filter:

Kleeneness is next to Godelness.

Working...