aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes How to get visitors IP address in Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "How to get visitors IP address in Java?" Watch "How to get visitors IP address in Java?" New topic
Author

How to get visitors IP address in Java?

Vicky Thakor
Greenhorn

Joined: Sep 04, 2010
Posts: 19
I searched whole google, tried tons of codes but can't find answer how to get visitors ip address...




You can check out on my website... it shows 127.0.0.1

http://www.0signals.com/test/
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Try this: http://en.wikipedia.org/wiki/X-Forwarded-For
Vicky Thakor
Greenhorn

Joined: Sep 04, 2010
Posts: 19


This will give you IP address of visitor you can read thie article

How to get visitors IP address in Java?
http://www.javaquery.com/2011/12/how-to-get-visitors-ip-address-in-java.html
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Not sure what you're asking; can you rephrase the question with more detail? Are you saying the x-forwarded-for header doesn't contain the IP address? If so, talk to your system admin for where else you might look for it. It's also possible that header hasn't been set up.
Vicky Thakor
Greenhorn

Joined: Sep 04, 2010
Posts: 19
Tim i got the solution and thank you.....I pasted code here so other who visit this thread can find the solution...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get visitors IP address in Java?
 
Similar Threads
How to get Mac Id of my client machine
Applets - web application
can we detect location if GPS is not accesible
Way to get IP address through Java?
How to get DNS IP Address