<%
  String userAgent = request.getHeader("User-Agent");
  if (userAgent != null && userAgent.indexOf("http") == -1 && userAgent.toLowerCase().indexOf("spider") == -1) {
    String ip = request.getRemoteHost();
    IpUtil ipUtil = new IpUtil();
    String country = ipUtil.getCountry(ip);
    String area = ipUtil.getArea(ip);
    ip = ip + "(" + country + "-" + area + ")";
    System.out.println(ip + "," + request.getRequestURI() + "?" + request.getQueryString()  + ", [" + userAgent + "]" );
  }
%>

相关文章:

  • 2021-12-21
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
  • 2021-11-27
  • 2022-12-23
  • 2021-11-21
猜你喜欢
  • 2021-12-21
  • 2022-12-23
  • 2021-10-26
  • 2022-02-28
  • 2021-08-11
  • 2022-12-23
相关资源
相似解决方案