Finding out a client's IP

FoodFight
01-25-2002, 03:34 PM
Here's a question for you guys:
I'm writting some client/server program, and i need the server program to find out the ip or the hostname of the clients
that are trying to connect to it...

Seems simple, and i may be missing something here,
but the Remotehost property is empty (the client's RemoteHost
has the server's IP of course...)

Any ideas?

haoli12345
01-29-2002, 08:02 AM
Shouldn't it be the other way around that the client logges on to server. Another thing RemostHost property will not work unless you are connected. To get the IP of the server (not the client) the client program can go to a webpage and retrieve the IP or you can use E-mail (it will be more complicated).


-Hao Li-

Squirm
01-29-2002, 09:42 AM
What about the RemoteHostIP property?

From MSDH Help:

For server applications, after an incoming connection request (ConnectionRequest event), this property contains the IP string of the remote machine that initiated the connection.

Ranger
01-29-2002, 10:31 AM
There's probably a better way of doing it, but you could use a Winsock control on the client and pass the LocalIP property back to the server. It's not elegant, but it works...

nsh
04-08-2002, 12:55 AM
Is there any way to find out about the remote hostname when I already have the IP address of the remote PC??

ccb
04-08-2002, 03:53 AM
try this link ...http://www.visualbasicforum.com/showthread.php?s=&postid=99051#post99051

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum