here i am again right
i need a code if someone is using firefox it redirects to another page or if someone is using internet explorer/any other browser it redirects to a diff page :P
Printable View
here i am again right
i need a code if someone is using firefox it redirects to another page or if someone is using internet explorer/any other browser it redirects to a diff page :P
I am also looking for something like this.
use if else statements i believe also use the search feature someone else asked for this before and mentor posted the answer.
knocked up this in 5 mins:
Should work
PHP Code:<?php
function browser($agent) {
$useragent = $_SERVER['HTTP_USER_AGENT'];
$notAgent = strpos($useragent,$agent) === false;
return !$notAgent;
}
if(browser('MSIE')){
header("Location: ie.php"); //Change ie.php to the page u want
}
if(browser('Firefox')){
header("Location: firefox.php"); //Change firefox.php to the page u want
}
header("Location: other.php"); //If not IE or not Firefox go here
?>