摘要:
调用外部接口获取用户ip地址 1 2 3 4 5 6 7 8 9 10 11 12 //通过搜狐接口获取用户的ip; $json = file_get_contents('http://pv.sohu.com/cityjson?ie=utf-8'); preg_match_all('/"cip"\s 阅读全文
摘要:
public String getIpAddress(HttpServletRequest request) { String ipAddress = request.getHeader("x-forwarded-for"); if(ipAddress == null || ipAddress.le 阅读全文