Zend - The PHP Company




HTTP

Add Code


simple redirection  

Type: code fragment
Added by: idban
Entered: 06/12/2000
Last modified: 07/12/2001
Rating: *** (3 votes)
Views: 19244
for designer who use many htmls for his/her site to spesific browser, this is just a sample you can customise by your self.


<?
//free to modify, customise for your own good, 
//idban secandri idban@satunet.com
//greet to ppls @ anak2.malasmandi.com 

$IE=eregi("MSIE",$HTTP_USER_AGENT);
if (
$IE==true) {
header("Location: http://$HTTP_HOST/4ie.html");
exit;
}
$NN6=eregi("Gecko",$HTTP_USER_AGENT);
if (
$NN6==true) {
header("Location: http://$HTTP_HOST/4nn6.html");
exit;
}
$NN=eregi("mozilla",$HTTP_USER_AGENT);
if (
$NN==true) {
header("Location: http://$HTTP_HOST/4nn.html");
exit;
}
else {
header("Location: http://$HTTP_HOST/4other.html");
exit;
}
?>


Usage Example


See the example


Rate This Script





Search



This Category All Categories