• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IP's

 
Robbie Harjes
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. Is there any command that will return the current IP of a given user? For instance, an applet that calls a function to return the IP of the user who loaded the applet? Thanks
 
Joe Ess
Bartender
Posts: 9337
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The static method java.net.InetAddress.getLocalHost() returns an InetAddress instance and you can get the IP from that. I'd be surprized if it would work since the applet, unless it is a signed applet, can't connect a socket to the host it is running on.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic