we can get it using $_SERVER super global array
eg: $useragent = $_SERVER['HTTP_USER_AGENT'];
if (strstr($useragent,'Win')) { $os='Win'; } else if (strstr($useragent,'Mac')) { $os='Mac'; } else if (strstr($useragent,'Linux')) { $os='Linux'; } else if (strstr($useragent,'Unix')) { $os='Unix'; } else { $os='Other'; }
Learn to Develop an iPhone or iPad App in 4 Weeks Learn the latest and greatest markup language in the market with Robin Nixon(HTML & HTML5) Now $29 Only(75% Off)
we can get it using $_SERVER
Mon, 07/21/2008 - 15:20 — adminwe can get it using $_SERVER super global array
eg: $useragent = $_SERVER['HTTP_USER_AGENT'];
if (strstr($useragent,'Win')) {
$os='Win';
} else if (strstr($useragent,'Mac')) {
$os='Mac';
} else if (strstr($useragent,'Linux')) {
$os='Linux';
} else if (strstr($useragent,'Unix')) {
$os='Unix';
} else {
$os='Other';
}