//取手机号
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")) {
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;
}
}
}
转载自
http://www.cnwzz.net/art/33/200811/12-269.html