Page 1 of 1

redirect user accourding to their browser type

Posted: Wed Apr 09, 2003 4:03 pm
by Winter
Hi, everyone:

Would you please tell me how do I redirect user to pages according to their browser type? for example: redirect the users who use IE to 111.htm, and redirect the users who use Netscape to 222.htm.

Thank you so much

Winter :oops:

Posted: Wed Apr 09, 2003 4:41 pm
by daven
use get_browser()/$_SERVER['HTTP_USER_AGENT'] in combination with header().

Posted: Wed Apr 09, 2003 6:00 pm
by bionicdonkey
this is what i use for stylesheets:

Code: Select all

<?php
if (eregi("msie", $_SERVER['HTTP_USER_AGENT'])) {
	echo "<link href="css/iestyle.css" rel="stylesheet" type="text/css">";
} else {
	echo "<link href="css/nsstyle.css" rel="stylesheet" type="text/css">";
}
?>

Posted: Thu Apr 10, 2003 11:26 am
by Winter
Thank you so much..
I solve the problem.. :D