PDA

View Full Version : IP address (All)


homeflash
09-10-2003, 01:37 PM
I am looking for a way or software or vb6 program codes to find my external ip address.

Ipconfig doesn't show my external address.

I need to know how to do it. I don't mean just to display on screen. I want to be able to put in a file for that ip I have.

Reason? I have one machine at home. But the dhcp keeps changing ip address. I have the vnc on. I want to know my ip address when the machine start on constantly (every hour or so) send me email about my current ip. I know, i know.. I tried the Ipmonitor software, somehow, the email does not function.

All i want is simple stuff. either..

a. A way to get external ip and export to a file, so i can modify my vb program to send me email on that.

b. a vb6 program codes to show my external ip.

thanks for your help...

*** Sometimes Helping is a way of Learning! ***

motoflop
09-11-2003, 11:47 AM
I have written small program for that. It sends http get request to www.whatismyip.com and picks ip address reply. You can run it from command prompt or script and pipe result to file. I could publish my utilty, but don't know good place to do it. You shouldn't trust if unknown person sends you program file by email.

You might be able to do it with visual basic script, but I don't know how. What you have to do is to open tcp connection to host www.whatismyip.com using port 80 and send string "GET http://www.whatismyip.com/" plus CR+LF. When you read reply from socket you get html page. Find "<TITLE>" where is string "Your ip is xx.xx.xx.xx".

homeflash
09-11-2003, 01:53 PM
Well, i have searched .. whatismy.com is one of the sites I found. It's good but no good if you don't know how to connect to vb. My objective is to get the ip onto a file or field from vb6, so that I can get it from other computer since my isp is dhcp for ip. I found some other programs that claim to be able to send ip notification, but yet they all don't work. Anyhow, I found another program vbs script from the net that will take care of it. and also connected to the asp and I did something else (from vb) to import to a file and dump to another file. Anyway, I got it work somehow.

*** Sometimes Helping is a way of Learning! ***

StuartIrving
10-23-2003, 09:05 AM
Try

ipconfig /all >> c:\ip.txt

Then open the c:\ip.txt file in script and read the address of the WAN adapter

homeflash
10-24-2003, 02:21 PM
That won't work if you have a router installed...

But anyway, I found a way to have it mailed to me every time I turn on the pc

*** Sometimes Helping is a way of Learning! ***