Orionsbelter Posted June 3, 2008 Share Posted June 3, 2008 Hi i want to do something different for each brower, but don't no how to or if you can. here is what i want to do if($brower =="IE"){ echo"your using IE";} elseif($brower =="Firefox"){echo"your using firefox";} thanks to all those that look Quote Link to comment Share on other sites More sharing options...
samshel Posted June 3, 2008 Share Posted June 3, 2008 try using $_SERVER["HTTP_USER_AGENT"] Quote Link to comment Share on other sites More sharing options...
Orionsbelter Posted June 3, 2008 Author Share Posted June 3, 2008 what to replace $brower and what would the browers be named IE or internet explore firefox or FF? Quote Link to comment Share on other sites More sharing options...
samshel Posted June 3, 2008 Share Posted June 3, 2008 <?php $browser = $_SERVER['HTTP_USER_AGENT']; if(ereg("MSIE", $browser)) { echo "Internet Explorer"; } if(ereg("Firefox", $browser)) { echo "Firefox"; } ?> Quote Link to comment Share on other sites More sharing options...
Rohan Shenoy Posted June 3, 2008 Share Posted June 3, 2008 Instead ereg functions use strpos() in this case. Quote Link to comment Share on other sites More sharing options...
Orionsbelter Posted June 3, 2008 Author Share Posted June 3, 2008 how would the coding look for that? Quote Link to comment 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.