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());
}
=======
Advertisement