Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

need help finding phone model in php

Posted on 2014-07-30
8
Medium Priority
?
172 Views
Last Modified: 2014-08-11
I am placing this code  on top of my webpage  and
<?

$phonemodel=$_SERVER['HTTP_USER_AGENT'];

?>

then on the html section I am calling it like this below
<?php
 echo $phonemodel;
 ?>

my issue is that what returns is
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36

and all i would love to get is the model of the phone....


any ideas?
0
Comment
Question by:giancarlo barraza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 4

Expert Comment

by:ambatihp
ID: 40230944
Are these cisco phones ?
If they are cisco phones they give you additional headers to identify the phone model.
0
 

Author Comment

by:giancarlo barraza
ID: 40230950
iphone, androd
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40230970
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Accepted Solution

by:
Murfur earned 2000 total points
ID: 40231324
Using javascript you can use navigator.platform which will say "iPhone" for an iPhone, "iPad" for an iPad and so on e.g.:
<script type="text/javascript">
function getSpecs() {
    var v = "Vendor: " + navigator.vendor;
    var p = "Platform: " + navigator.platform;
    var an = "App Name: " + navigator.appName;
    var av = "App Version: " + navigator.appVersion;

    document.getElementById("specs").innerHTML = v + "<br/>" + p + "<br/>" + an + "<br/>" + av + "<br/>";
}
</script>
<button onclick="getSpecs()">Click me</button>
<p id="specs"></p>

Open in new window


and you can parse navigator.appVersion to get to common browser name & version e.g. Firefox v31.0

Pretty much every option you can use can be found at the very excellent http://browserspy.dk
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 40231365
0
 
LVL 14

Expert Comment

by:Renante Entera
ID: 40231454
Hi giancarlo barraza, if you want to be more specific with what model then you could simply use DeviceAtlas but it is NOT FREE.

You can check their site here => https://deviceatlas.com/
0
 

Author Comment

by:giancarlo barraza
ID: 40232372
do you have to install in server?
0
 
LVL 14

Expert Comment

by:Renante Entera
ID: 40234570
Actually, there is no need to install in server...

You can use their APIs but it is not free.  For Cloud API, they have free trial.

Check this out https://deviceatlas.com/resources/download-cloud-api.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question