Page 1 of 1

how do you detect if a browser is a WAP browser?

Posted: Tue Jul 12, 2005 10:32 am
by twrofpwr
Hey guys how do you detect if someone is coming from a WAP enabled device?

:)

Posted: Tue Jul 12, 2005 10:46 am
by hawleyjr
The only way I know how to is by checking $_SERVER[HTTP_USER_AGENT] and running that against a table...

Code: Select all

$_SERVER[HTTP_USER_AGENT] => BlackBerry7520/4.0.0 UP.Browser/5.0.3.3 UP.Link/5.1.2.12 (Google WAP Proxy/1.0)

Code: Select all

Alcatel-TH3/1.0 UP.Browser/6.2.ALCATEL MMP/1.0
AU-MIC/2.0 MMP/2.0
BlackBerry7100/3.8.0
BlackBerry7230/3.7.1 UP.Link/1.1
BlackBerry7230/4.0.0 Profile/MIDP-2.0 Configuration/CLDC-1.1
BlackBerry7250/4.0.0 Profile/MIDP-2.0 Configuration/CLDC-1.1
BlackBerry7520/4.0.0 UP.Browser/5.0.3.3 UP.Link/5.1.2.12 (Google WAP Proxy/1.0)
BlackBerry7730/3.7.1
BlackBerry7750/3.7.1
BlackBerry7780/3.7.1
jBrowser-WAP/1.0.4

Posted: Wed Oct 19, 2005 6:26 pm
by miladmovie
hello
I have same problem
see this browser : http://www.wapsilon.com/?t=w;f=1::wapsilon.com
if you enter google.com it will redirec to google wap !
but really how can detect ?
as you see this is not have $_SERVER[HTTP_USER_AGENT] like you wrote!?

Posted: Wed Oct 19, 2005 9:05 pm
by Jenk

Code: Select all

$_SERVER['HTTP_USER_AGENT']

Posted: Thu Oct 20, 2005 5:05 am
by onion2k
In theory a WAP browser should have text/wml rather than text/html in it's HTTP_ACCEPT string..