ccrevcypsys Posted October 24, 2007 Share Posted October 24, 2007 What code do i use to find what kind of browser someone is using??? Quote Link to comment https://forums.phpfreaks.com/topic/74640-solved-finding-the-browser/ Share on other sites More sharing options...
rlindauer Posted October 24, 2007 Share Posted October 24, 2007 Javascript: http://www.quirksmode.org/js/detect.html Quote Link to comment https://forums.phpfreaks.com/topic/74640-solved-finding-the-browser/#findComment-377268 Share on other sites More sharing options...
The Little Guy Posted October 24, 2007 Share Posted October 24, 2007 echo $_SERVER['HTTP_USER_AGENT']; Quote Link to comment https://forums.phpfreaks.com/topic/74640-solved-finding-the-browser/#findComment-377270 Share on other sites More sharing options...
ccrevcypsys Posted October 24, 2007 Author Share Posted October 24, 2007 now if i want to use this to make an if statement what would i do. i need to do something if it is ie and it is different than moz? Quote Link to comment https://forums.phpfreaks.com/topic/74640-solved-finding-the-browser/#findComment-377276 Share on other sites More sharing options...
The Little Guy Posted October 24, 2007 Share Posted October 24, 2007 <?php if(preg_match("~MSIE~",$_SERVER['HTTP_USER_AGENT'])){ echo 'This is Microsoft Internet Explorer'; }else{ echo 'This is Mozilla FireFox'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/74640-solved-finding-the-browser/#findComment-377279 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.