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. Quote 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. Quote 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 />"; ?> Quote 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 =] Quote Link to comment https://forums.phpfreaks.com/topic/106368-solved-get-os/#findComment-545283 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.