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.
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
Gurvinder Pal SinghCommented:
<<Any advice you could offer ?>>
which devices you are targetting?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook 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.
ImaginxAuthor Commented:
Also, what would be your concerns with $_SERVER['HTTP_USER_AGENT'] being a user modifiable field ?
Gurvinder Pal SinghCommented:
In that case, you should look at the guide by apple

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
ImaginxAuthor Commented:
absolutely perfect for my project !! thanks !
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

From novice to tech pro — start learning today.