How to Detect Mobile Devices: iPhone Android Google Phone Browser



How to Detect Mobile Devices: iPhone Android Google Phone Browser

source

18 thoughts on “How to Detect Mobile Devices: iPhone Android Google Phone Browser”

  1. If you don't care what what mobile platform the client is user just black list them and redirect them to the mobile site.

    /(iPhone|BlackBerry|Android|Bolt|Blazer|SymbianOS)/i

  2. So, all I do copy and paste the PHP script onto my homepage, before any of the other code. It's not working for me. I'm not sure what the problem is. Could it be my location URL? you have "android_home.html"?

  3. Great info Adam – What's you take on Wapple and MoFuse whom as I understand it provide (come with) the code needed to automatically detect which mobile device is hitting the site and then renders the proper code automatically?

  4. works like a charm, thanks adam. i gotta tell ya that steve jobs and his dislike of flash makes no sense to me. mac folks seem to be having a hard time defending him these days.

  5. For some reason the Moto Droid has 'Android' in its UA string… you might want to do '/android/i' or do and another case if you're attempting to detect the 2.1 Droid phone.

Leave a Reply

Your email address will not be published. Required fields are marked *