千山鸟飞绝 万径人踪灭
勤练内功,不断实践招数。争取早日成为武林高手
转载: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;
}
}
}
posted on 2009-09-17 20:15 笑口常开、财源滚滚来! 阅读(1297) 评论(2)  编辑  收藏 所属分类: J2ME
Comments
  • # re: JSP下获取手机号码
    笑口常开、财源滚滚来!
    Posted @ 2009-09-17 20:34
    //取手机号
    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  回复  更多评论   
  • # re: JSP下获取手机号码
    啊啊啊
    Posted @ 2014-04-07 22:51
    吹牛逼把
      回复  更多评论   

只有注册用户登录后才能发表评论。


网站导航: