Page 1 of 1

Getting my friend's IP address

Posted: Sun Dec 21, 2003 1:22 pm
by Rahman
hello there,
how could i get my friend's ip address through my VC++ program after logging into the internet. we both have the dial-up connection to dial to the internet. is there any special API function available in the windows?

any help appreciated.

Re:Getting my friend's IP address

Posted: Sun Dec 21, 2003 7:02 pm
by Tim
No. This is a problem of the Internet in general, not of programming Windows.

Two ways of getting an IP address:
-- use DNS: get your friend to register a domain name and keep it updated with dynamic DNS, e.g. through www.zoneedit.com
-- ask them for their IP address: use some other channel (e.g. the telephone) and get hold of their numerical IP address. This is easier if they use static IP, since it will be the same each time, but this is unlikely if they're on dialup.

Re:Getting my friend's IP address

Posted: Mon Dec 22, 2003 8:59 pm
by Curufir
Have your friend open up a command prompt and use ipconfig to determine his IP address, then have him email it to you.