PX : code

Browserdetection by Artjom Bruch
Download this code


<?php
   $a 
strtolower($HTTP_ACCEPT);
   
$u strtolower($HTTP_USER_AGENT);
   if (
strpos($a"vnd.wap.wml\\\")>0) {
      header(\\\"Location: /wml/index.wml\\\");
   } elseif (strpos($u, \\\"opera\\\")>0) {  //Opera
     header(\\\"Location: /html/opera.html\\\");
   } elseif (strpos($u, \\\"msie\\\")>0) {  //IE
     header(\\\"Location: /html/ie.html\\\");
   } elseif (substr($u, 0, 9) == \\\"mozilla/5\\\") {  //Netscape 6
     header(\\\"Location: /html/netscape6.html\\\");
   } elseif (substr($u, 0, 9) == \\\"mozilla/4\\\") {  //Netscape 4.x
     header(\\\"Location: /html/netscape4.html\\\");
   } else {  //anderer Browser
     header(\\\"Location: /html/anderer.html\\\");
   }
?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.