I\'d like to extract full the OS name and browser from the user agent string. How can I do this?
There's also a built-in function in PHP to achieve this and more: get_browser().
$agent = get_browser(); echo $agent->platform; echo $agent->parent; // or $agent->browser . $agent->version