Detecing phone models using the User agent string or any way

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mobilephp
Forum Newbie
Posts: 1
Joined: Mon Jul 12, 2010 5:20 am

Detecing phone models using the User agent string or any way

Post by mobilephp »

Hi,

I am new to the forum. Can any one tell me,
how to include the UA strings in the script and how to link to the script to make my site to detect which phone model it is.
Thank you in advance.
jraede
Forum Contributor
Posts: 254
Joined: Tue Feb 16, 2010 5:39 pm

Re: Detecing phone models using the User agent string or any

Post by jraede »

I'm sure there are scripts out there that grab the phone model form the user agent. But if you're up for writing one yourself you can just echo out $_SERVER['HTTP_USER_AGENT'] and create a regular expression to grab the phone model by checking out what it displays on different phones.
cpetercarter
Forum Contributor
Posts: 474
Joined: Sat Jul 25, 2009 2:00 am

Re: Detecing phone models using the User agent string or any

Post by cpetercarter »

Here is a useful list of user-agent strings for a number of mobile phone models.
Post Reply