转载:http://www.host01.com/article/Wap/wap001/05922162843330.htm
JSP下获取手机号码
//取手机号
String mobile = "" ;
String MO="";
String temvit = "";
String version = "";
Enumeration headerNames = request.getHeaderNames();
while(headerNames.hasMoreElements()) {
String headerName = (String)headerNames.nextElement();
if (headerName.equals("x-up-calling-line-id")) {
temvit=request.getHeader(headerName);
if (temvit.substring(0,3).trim().equals("861")) {
mobile=temvit.substring(2,13);
}
if (temvit.substring(0,2).trim().equals("13")) {
mobile=temvit;
}
}
if (headerName.equals("user-agent")) {
<--ubbcodetab--> <--/ubbcodetab-->MO=request.getHeader(headerName);
}
if (headerName.equals("x-up-calling-line-id")) {
temvit=request.getHeader(headerName);
if (temvit.substring(0,2).trim().equals("13")) {
mobile=temvit;
}
}
}