View Single Post
Old 11-27-2006, 07:13 PM   #3 (permalink)
MobileDesigner
Platinum Lifetime Member
 
MobileDesigner's Avatar
 
Name: (/ _ \)
Last Online: Yesterday 09:02 PM
iTrader: (2)
Join Date: Nov 2006
Posts: 1,048
DNF$: 10
Location: Texan living in Japan
Country:


Re: Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page

Quote:
Originally Posted by 01010101 View Post
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;
}
Got anything else besides wap? If we access this site from Japan, we see the code above on the mobile phones.
__________________
>>> | www.FlashMap.jp | <<< The First Interactive Mobile Flash Map for Mobile Devices
MobileDesigner is offline   Reply With Quote