I am developing a web site and am trying to make it work on all devices. I also have a page where people can report issues so I can look into them. However, I was asking for way too much info from them. I have done a lot of reading and now can determine through PHP their operating system and browser. But I still need to know what device they are using to connect. (Like Mac, Dell, HP, iPad.) I found some stuff on cell phones and tablets but is there any way of getting the info from desktop and laptop computers? As you may have guessed I'm a rookie just learning this stuff. Thanks.
No there is no way to get information about the hardware. Because the Browser sends the informations. You can get the OS, but not more. And over the OS you can draw a conclusion about the hardware like IPad etc.
All the information you can gather from the device comes in the HTTP header USER_AGENT, As you said for mobile devices this agent is more descriptive, for desktop browser there is very little you can know (browser , operative system and version)
There are some libraries like WURFL that can help you retrieve more information for mobiles using a large USER_AGENT DB
You can try using platform.js class:
<script type='text/javascript' src='https://raw.github.com/bestiejs/platform.js/master/platform.js'></script>
<script type='text/javascript'>
alert('you are using ' + platform.description + ' on an ' + (platform.manufacturer || 'unknown vendor') );
</script>
I get the following, for instance: "you are using Firefox 25.0 on OS X 10.9 on an unknown vendor"
<?php
echo $_SERVER['HTTP_USER_AGENT'] . "
";
$browser = get_browser(null, true);
print_r($browser);
?>
The above example will output something similar to:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3
Array
(
[browser_name_regex] => ^mozilla/5\.0 (windows; .; windows nt 5\.1; .*rv:.*) gecko/.* firefox/0\.9.*$
[browser_name_pattern] => Mozilla/5.0 (Windows; ?; Windows NT 5.1; *rv:*) Gecko/* Firefox/0.9*
[parent] => Firefox 0.9
[platform] => WinXP
[browser] => Firefox
[version] => 0.9
[majorver] => 0
[minorver] => 9
[cssversion] => 2
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[vbscript] =>
[javascript] => 1
[javaapplets] => 1
[activexcontrols] =>
[cdf] =>
[aol] =>
[beta] => 1
[win16] =>
[crawler] =>
[stripper] =>
[wap] =>
[netclr] =>
)