View Full Version : php code :p
Jamie.
23-08-2006, 08:44 AM
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
PixelResources
23-08-2006, 09:21 AM
I am also looking for something like this.
Colin-Roberts
23-08-2006, 07:41 PM
use if else statements i believe also use the search feature someone else asked for this before and mentor posted the answer.
Eric30
23-08-2006, 08:34 PM
knocked up this in 5 mins:
Should work
<?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
?>
Jamie.
23-08-2006, 10:38 PM
knocked up this in 5 mins:
Should work
<?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
?>
why thhank yew
+rep if i can
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.