Re: Getting client IP address



On Mar 9, 7:17 am, IchBin <wecon...@xxxxxxx> wrote:
Is there a way, using java.net, to get the IP address of the client PC
the java app is running.

Fooling around wit it and I only get the localhost address 127.0.0.1

--
Thanks in Advance... http://weconsultants.prophp.org
IchBin, Pocono Lake, Pa, USA http://ichbinquotations.awardspace.com
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

You can get the IP Address in the following way:

InetAddress addr = InetAddress.getLocalHost();
// Get IP Address
byte[] ipAddr = addr.getAddress();

// Get hostname
String hostname = addr.getHostName();
just try it out.

.