I've create a chatting program using Winsock control. I've created two versions, one with UDP protocol and the other with TCP/IP protocol. Now I am trying to chat with a friend over the Internet with the program I created, but I don't know what to give as the "RemoteHost" value. I would need to specify the IP address of the user (or the friendly computer name which is a netBIOS name) with whom I would like to chat.
But the problem is how can I get the person's IP address? (I only know e-mail address). If not, what about the friendly name, Computer Name? Or, is there any other way I can get connected?
Well, assuming that you know at least the subnet that he's on, you could do this:
dim a as integer,b as integer,c as integer,d as integer
dim PingPacket as string
dim IP as string
ip = "127.0."
for c = 1 to 255
for d=1 to255
.remotehost=ip & c & "." & d