What the best method of mobile device detection I can build into a mobile site?

I have a website that will be live as of Monday or Tuesday this upcoming week.

Once we go live, I need to start the development of the mobile site. Instead of just doing a standard browser/resolution detection - is there a way to detect the device that's visiting the site...

Not only would it be valuable data for analytics, but I could choose (i realize resolution would also work for this) a css file based on the device ...

I'm still brainstorming - even though the project is only a week out ... any & all comments are appreciated ...

Bottom line - best method (I'm assuming by device detection) to choose the appropriate graphics tailored to the device you're visiting with.
LVL 1
ImaginxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ImaginxAuthor Commented:
Man !! That looks great - I'm slightly frustrated I didn't think of using the $_SERVER['HTTP_USER_AGENT'] value myself !! ....

This will def make the project more simple ... I prefer to do as much in php over javascript when the site relies on the availability of the data .. This way, even w/ javascript turned off - I'll still be able to retrieve all the data I want ...

Any advice you could offer ? I've developed many web apps over the years, but this is the first one I'll be doing on mobile devices ...

I'm not the UI developer though - just backend.

Thanks again though Gurvinder
0
Gurvinder Pal SinghCommented:
<<Any advice you could offer ?>>
which devices you are targetting?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ImaginxAuthor Commented:
Wel iOS devices make up the largest percentage of mobile device web traffic, so that's where I plan to start. The site just the front end to a social networking web app (however, the mobile version will offer limited functionality)
Followed by Android devices.
I would like to shy away from anything still using a WAP browser.
0
ImaginxAuthor Commented:
Also, what would be your concerns with $_SERVER['HTTP_USER_AGENT'] being a user modifiable field ?
0
Gurvinder Pal SinghCommented:
In that case, you should look at the guide by apple
http://developer.apple.com/library/mac/#documentation/AppleApplications/Conceptual/Dashcode_UserGuide/Contents/Resources/en.lproj/MakingaWebApp/MakingaWebApp.html

also 'User agent' is no longer modifiable from the browser client, since latest browsers (and certainly the mobile devices) are secure enough to not allow that request headers fields to be modified
0
ImaginxAuthor Commented:
absolutely perfect for my project !! thanks !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.