Applellial Posted March 5, 2011 Share Posted March 5, 2011 I have done some searching and digging, but it seems everyone has their own ways of doing things, some more effective than others. I have a web design portfolio website, which uses a "coinslider" flash slideshow. It looks awesome in FF, but IE6/etc users cant view it properly. How can I create a PHP if/then to detect if they are using a sub-par browser, and display a more simple slideshow? That way it will work for all users, and those with Firefox and similar browsers can view the more interesting slideshow. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/229632-ifthen-browser-detection/ Share on other sites More sharing options...
joel24 Posted March 5, 2011 Share Posted March 5, 2011 Use the get_browser() function. There is a nice user contributed function in the notes (2nd one, by 'ruudrp at live dot nl') To ensure it worked, I would set the IF to show the flash slideshow only in tested browsers which work. i.e. $browser = get_browser(null, true); if ($browser['browser']=='Firefox' || $browser['browser']=='Other working browser') { //echo the flash } else { //echo the simple slideshow } Quote Link to comment https://forums.phpfreaks.com/topic/229632-ifthen-browser-detection/#findComment-1183134 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.