HELP with reading a clients ip address and storing in a text file.
I understand how to do this with the loaclhost but confused on how to do this with determine the clients ip, any help would be great.
Re: HELP with reading a clients ip address and storing in a text file.
getRemoteAddr() of HTTPSERVLET.
This will give you the IP of the client but one thing, if client is using proxy, it may not give you the exact IP but the proxy that is being used by client.
If you want to get the exact IP of client, you'll have to use the header, this header is custom header for request and you should use it like,
I hope this will solve your problem.