Originally Posted by 01010101 credit goes to mediahound from this forum (he posted this while ago?)
## DETECT WAP
if ( ereg( "text/vnd.wap.wml",strtolower($HTTP_ACCEPT) ) ){
include"/home/your/wap/index.wml";
exit;
}
switch (true){
case ereg( "wap" , strtolower ($HTTP_USER_AGENT) ):
case ereg( "wml" , strtolower ($HTTP_USER_AGENT) ):
case ereg( "phone" , strtolower ($HTTP_USER_AGENT) ):
case ereg( "4thpass.com KBrowser" , $HTTP_USER_AGENT ):
case ereg( "ACER" , $HTTP_USER_AGENT ):
case ereg( "Alcatel-BE" , $HTTP_USER_AGENT ):
case ereg( "EPOC" , $HTTP_USER_AGENT ):
case ereg( "Ericsson" , $HTTP_USER_AGENT ):
case ereg( "Go.Web" , $HTTP_USER_AGENT ):
case ereg( "Jingo" , $HTTP_USER_AGENT ):
case ereg( "Klondike" , $HTTP_USER_AGENT ):
case ereg( "m-crawler" , $HTTP_USER_AGENT ):
case ereg( "M3GATE" , $HTTP_USER_AGENT ):
case ereg( "Mitsu" , $HTTP_USER_AGENT ):
case ereg( "MOCOCO" , $HTTP_USER_AGENT ):
case ereg( "MOT" , $HTTP_USER_AGENT ):
case ereg( "Sony" , $HTTP_USER_AGENT ):
case ereg( "Nokia" , $HTTP_USER_AGENT ):
case ereg( "Panasonic" , $HTTP_USER_AGENT ):
case ereg( "Rainbow" , $HTTP_USER_AGENT ):
case ereg( "Rover" , $HTTP_USER_AGENT ):
case ereg( "SAGEM" , $HTTP_USER_AGENT ):
case ereg( "SAMSUNG" , $HTTP_USER_AGENT ):
case ereg( "UP" , $HTTP_USER_AGENT ):
case ereg( "TF Search robot" , $HTTP_USER_AGENT ):
case ereg( "Webmonkey/0.2 NoComment" , $HTTP_USER_AGENT ):
include"/home/your/wap/index.wml";
exit;
} |