日期:2009-12-16 浏览次数:20407 次
我们在开发wap应用程序需要有识别来访手机品牌型号的功能,这样才可以更好的为用户提供更好的个性化服务,比如图片类型、屏幕尺寸、铃声类型等。
http协议中,User-Agent这个标头指示的浏览器信息,文章最后附加了常见的手机User-Agent.
每个厂家,甚至一个厂家多个品牌的User-Agent都没有一个统一命名标准,所以处理起来相当麻烦---不停的if。
比如判断某个手机的品牌
If Request.UserAgent.ToUpper.StartsWith("MOT") Or Request.UserAgent.ToUpper.StartsWith("MOT") Then
'摩托罗拉
End If
If Me.Request.UserAgent.ToUpper.IndexOf("-SGH") > 0 Then
'三星
End If
判断型号的话方法同上。
这样处理也有一些例外,比如摩托罗拉E360 会识别成T33这个是厂商的问题了。。
常见手机User-Agent:
Log_Brand Log_module Log_Ua
Arima Arima 2860 Profile/MIDP-2.0 Configuration/CLDC-1.1
CECT A706 CECT A706
CECT E818 CECT-E818/(2004.07.01)SW2.0.0/WAP1.2 Profile/MIDP-2.0 Configuration/CLDC-1.1
CECT G3300 CECT G3300/UT_SAMMY_A_06.20/WAP1.2 Profile/MIDP-2.0 Configuration/CLDC-1.1
CECT M62 CECT-M62
CECT M72 CECT-M72
CECT S568 CECTs568/(2004.07.27)SW2.0.0/WAP1.2
CECT S857 CECT S857
CECT T586 CECTT586/(2004.11.30)1.0/WAP1.2.1 Profile
CECT T700 CECT_T700
CECT T868 CECT T868
Compal C8600 Compal-C8600/1.0 UP.Browser/6.2.2.3 (GUI) MMP/1.0
Compal CHASE898 Compal-CHASE898/1.0 UP.Browser/6.2.2.3 (GUI) MMP/1.0
Compal COMPA Compal-Compa/1.4 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Browser/6.2.2.3 (GUI) MMP/1.0
Compal HZ8 Compal-HZ8/1.0 UP.Browser/6.2.2.7.c.1.101 (GUI) MMP/1.0
Compal I361 Compal- I361/1.0 UP.Browser/6.2.2.3 (GUI) MMP/1.0
Compal I368 Compal- I368/1.0 UP.Browser/6.2.2.3 (GUI) MMP/1.0
Compal SEVILLE Compal-Seville/1.4 UP.Browser/5.0.3.2 (GUI)
Compal TG762 Compal-TG762/1.0 UP.Browser/6.2.2.7 (GUI) MMP/1.0
Compal TG762D Compal-TG762D/1.0 UP.Browser/6.2.2.7.c.1.101 (GUI) MMP/1.0
Compal U8800 Compal-U8800/1.0 UP.Browser/6.2.2.7 (GUI) MMP/1.0
Compal U8800A Compal-U8800A/1.0 UP.Browser/6.2.2.7 (GUI) MMP/1.0
Compal U8810 Compal-U8810/1.0 UP.Browser/6.2.2.7.c.1.101 (GUI) MMP/1.0
Compal XG3C Compal-XG3C/1.0v UP.Browser/4.1.23c
Compal XG5 Compal-XG5/1.0v UP.Browser/4.1.23c
CTL 2.0 CONFIGURATION CTL/(2004.07.01)SW2.0.0/WAP1.2 Profile/MIDP-2.0 Configuration/CLDC-1.1
CTL ROCKET CTL-ROCKET/1.0/WAP1.2 Profile/MIDP-1.0 Configuration/CLDC-1.1
LG B2050 LG-B2050 MIC/WAP2.0 MIDP-2.0/CLDC-1.0
LG C1100 LG-C1100 MIC/WAP2.0 MIDP-2.0/CLDC-1.0
LG CU8080 LGE-CU8080/1.0 UP.Browser/4.1.26l
LG G1800 LG-G1800 MIC/WAP2.0 MIDP-2.0/CLDC-1.0
LG G210 LG-G210/SW100/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0
LG G220 LG-G220/V100/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0
LG G232 LG-G232/V100/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0
LG G262 LG-G262/V100/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0
LG G5200 LG-G5200 AU/4.10
LG G5600 LG-G5600 MIC/WAP2.0 MIDP-2.0/CLDC-1.0
LG G610 LG-G610 V100 AU/4.10 Profile/MIDP-1.0 Configuration/CLDC-1.0
LG G622 LG-G622/V100/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0
LG G650 LG-G650 V100 AU/4.10 Profile/MIDP-1.0 Configuration/CLDC-1.0
LG G660 LG-G660/V100/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0
LG G672 LG-G672/V100/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0
LG G682 LG-G682 /V100/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0
LG G688 LG-G688 MIC/V100/WAP2.0 MIDP-2.0/CLDC-1.0
LG G7000 LG-G7000 AU/4.10
LG G7050 LG-G7050 UP.Browser/6.2.2 (GUI) MMP/1.0 Profile/MIDP-1.0 Configuration/CLDC-1.0
LG G7100 LG-G7100 AU/4.10 Profile/MIDP-1.0 Configuration/CLDC-1.0
LG G7200 LG-G7200 UP.Browser/6.2.2 (GUI) MMP/1.0 Profile/MIDP-1.0 Configuration/CLDC-1.0
LG G822 LG-G822/SW100/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0
LG G850 LG-G850 V100 UP.Browser/6.2.2 (