|
-
Feb 14th, 2005, 04:05 PM
#1
Thread Starter
Fanatic Member
[Resolved]how to take both IP addresses
i want to get internet ip address when i m sitting on server of a LAN...
winsock1.localip gives me just LOCAL i.1p like 192.168.0.1
i want to get both this one ant Internet Ip as well from vb code.. thx :mike:
Last edited by vbPoet; Feb 22nd, 2005 at 03:59 PM.
-
Feb 14th, 2005, 04:11 PM
#2
Re: how to take both IP addresses
well when you are behind a router your computer can't tell that there is a wan IP address... so I don't know how you would be able to get this information via code. If someone has an answer I would like to see it as well, because as far as I know it isn't possible
-
Feb 14th, 2005, 05:16 PM
#3
Re: how to take both IP addresses
 Originally Posted by kleinma
well when you are behind a router your computer can't tell that there is a wan IP address... so I don't know how you would be able to get this information via code. If someone has an answer I would like to see it as well, because as far as I know it isn't possible
yea i've been looking into it, the only way i can think of doing it (i cnat find an api either) is going to a page such as www.whatismyip.com and looking there (i'm not sure about code)
I'll see what i cna find though because it is an interesting point
-
Feb 14th, 2005, 05:41 PM
#4
New Member
Re: how to take both IP addresses
This page is just a SSI script.
Probably this one:
Code:
<!--#echo var="REMOTE_ADDR" -->
I believe you could make a prog that grubs the info from this page.
I don’t think there’s a way of knowing the IP that is given to you by your isp cuz it comes till your router.
In other words it doesn’t reach your PC…
-
Feb 14th, 2005, 05:51 PM
#5
Re: how to take both IP addresses
 Originally Posted by Pino
yea i've been looking into it, the only way i can think of doing it (i cnat find an api either) is going to a page such as www.whatismyip.com and looking there (i'm not sure about code)
I'll see what i cna find though because it is an interesting point
Haven't tested this :
VB Code:
Dim strName As String
Private Sub Form_Load()
txtUrl.Text = "http://checkip.dyndns.org/"
txtIP = (Inet1.OpenURL(txtUrl.Text))
strName = Replace(txtIP, "<html><head><title>Current IP Check</title></head><body>Current IP Address: ", "")
strName = Replace(strName, "</body></html>", "")
txtIP.Text = strName
End Sub
Has someone helped you? Then you can Rate their helpful post. 
-
Feb 15th, 2005, 04:14 AM
#6
Re: how to take both IP addresses
 Originally Posted by manavo11
Haven't tested this :
VB Code:
Dim strName As String
Private Sub Form_Load()
txtUrl.Text = "http://checkip.dyndns.org/"
txtIP = (Inet1.OpenURL(txtUrl.Text))
strName = Replace(txtIP, "<html><head><title>Current IP Check</title></head><body>Current IP Address: ", "")
strName = Replace(strName, "</body></html>", "")
txtIP.Text = strName
End Sub
Thats what i was thinking a way to parse the HTML, but couldnt think how to do it 
Pino
-
Feb 15th, 2005, 05:53 AM
#7
Re: how to take both IP addresses
yea its impossible to get the external ip unfortunatly without using something on the "outside" to comunicate with 
i used to use a free hosting site brinkster.com and just returned the clients ip in an asp page there
-
Feb 17th, 2005, 04:49 PM
#8
-
Feb 17th, 2005, 05:05 PM
#9
Re: [Resolved]how to take both IP addresses
 Originally Posted by manavo11
its still an "outside" source though...
-
Feb 17th, 2005, 06:00 PM
#10
-
Feb 17th, 2005, 06:20 PM
#11
Re: [Resolved]how to take both IP addresses
Because it IS impossible to DO.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|