Originally Posted by C++
thanx. one more question. is there a way to return the ip address to a java/c++ program?
This is how you can grab the client ip address:
InetAddress thisIp =
InetAddress.getLocalHost();
System.out.println("IP:"+thisIp.getHostAddress());
Remember to include that in a try catch clause, as that code could potentially cause an exception.
Also, writting a simple servlet would be easier:
String IP = req.getRemoteAddr();
req is an HTTPServletRequest Object.