mattchris18 Posted March 29, 2008 Share Posted March 29, 2008 <?php if ( ( browser_detection( 'browser' ) == 'ie' ) { redirect code here } else { display normal here } ?> Above i am trying to make it so my web page finds out if the visitor is using Internet explorer (any version), and if they are using internet explorer i want it to redirect them to another page on my website... But if they are using any other browser e.g firefox or mozilla... i want it to display the page as normal :S My above code didnt work, i am a total noobie with PHP any help from you guys will be very much appriciated!!! Thank you Link to comment https://forums.phpfreaks.com/topic/98453-browser-detect-if-else-help-please/ Share on other sites More sharing options...
thebadbad Posted March 29, 2008 Share Posted March 29, 2008 <?php if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) { header('Location: http://example.com/'); exit; } else { // page for non-IE users } ?> Link to comment https://forums.phpfreaks.com/topic/98453-browser-detect-if-else-help-please/#findComment-503856 Share on other sites More sharing options...
mattchris18 Posted March 29, 2008 Author Share Posted March 29, 2008 Cheers Link to comment https://forums.phpfreaks.com/topic/98453-browser-detect-if-else-help-please/#findComment-503930 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.