• Post Reply Bookmark Topic Watch Topic
  • New Topic

When we Refresh the page track the ip  RSS feed

 
anwar pasha
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When Refresh the page on banner,getting the ip address before the clicking or impression
-------------------------
Object reIp= remoteAddress(request);
String remoteIPAddress = reIp.toString();



public static InetAddress remoteAddress(HttpServletRequest request)throws UnknownHostException {
if (request.getHeader("x-forwarded-for") != null) {
return InetAddress.getByName(request.getHeader("x-forwarded-for"));
}
return InetAddress.getByName(request.getRemoteAddr());
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!