Page 1 of 1

Getting the remote IP-Adress

Posted: Sat Dec 13, 2003 6:33 pm
by merendo
Hi all

I have a network question: How can i retrieve the remote adress of a network client? This is the adress, thru which the client is connected to the server. I need to retrieve this adress on the client side.

Example:

[Server: 192.168.0.1] <--> [Client: 192.168.0.2]

the remote adress of the client would be 192.168.0.2 . The problem is, that if the client has more than one IP adress i don't know which one is the right one.

Thanks for any help! merendo

Posted: Sat Dec 13, 2003 7:09 pm
by Proteus

Posted: Sat Dec 13, 2003 7:27 pm
by merendo
Exactly! But I need to retrieve the localip$ on the client side. Not on the server side :(

Posted: Sat Dec 13, 2003 9:02 pm
by blueznl
strange question but... what would you need it for?

Posted: Sat Dec 13, 2003 9:52 pm
by merendo
Little security check for a chat programme... Since an earlier version of that progamme has been cracked, i used to be more careful.

Posted: Sat Dec 13, 2003 11:14 pm
by Proteus
The code works on the client side as well. Just run it after connecting to the server, and store put the connection ID in the cnid var...

Posted: Sun Dec 14, 2003 9:32 am
by merendo
Looks like it really works. Thank you very much indeed! :D :D :D