40esp Posted May 19, 2008 Share Posted May 19, 2008 is there anyway to retrieve the OS version a person is using? the reason being is that I want to use wmode on my website, which is unsupported by linux, so If they are using linux, I will display a gif instead. if that makes any sense. Link to comment https://forums.phpfreaks.com/topic/106368-solved-get-os/ Share on other sites More sharing options...
wildteen88 Posted May 19, 2008 Share Posted May 19, 2008 You should be able to decipher the OS a user is using by the string returned by the $_SERVER['HTTP_USER_AGENT'] variable. Link to comment https://forums.phpfreaks.com/topic/106368-solved-get-os/#findComment-545243 Share on other sites More sharing options...
jonsjava Posted May 19, 2008 Share Posted May 19, 2008 <?php $split1 = explode("(", $_SERVER['HTTP_USER_AGENT']); $split2 = explode(";", $split1[1]); $OS = $split2[0]; $OS_ver = $split2[2]; print "Your OS: ".$OS."\n<br />"; print "Your OS version: ".$OS_ver."\n<br />"; ?> Link to comment https://forums.phpfreaks.com/topic/106368-solved-get-os/#findComment-545246 Share on other sites More sharing options...
40esp Posted May 19, 2008 Author Share Posted May 19, 2008 THANKS!! Lifesaver =] Link to comment https://forums.phpfreaks.com/topic/106368-solved-get-os/#findComment-545283 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.