$htmlredirect = "http://crazywap.org"; $wmlredirect = "http://crazywap.org"; if(strpos(strtoupper($HTTP_ACCEPT),"VND.WAP.WML") > 0){ header("Location: ".$wmlredirect);} else{ header("Location: ".$htmlredirect); exit;}