|
-
Nov 22nd, 2002, 05:22 PM
#1
Thread Starter
Addicted Member
External IP
For people with routers finding the local ip just doesnt work. So i need external.
Is there any way to find out the EXTERNAL IP? I've searched around on the forum but didnt find very much.

I thought of it this way. put a web browser on the form. visit this link http://team-ly.com/ip.php and then reading the source. But thats to much stuff to do. I'm just looking for something code wise to find this.
-
Nov 22nd, 2002, 05:46 PM
#2
New Member
tery dis:
[Highlight=VB]Mserbox Winsack1.Lacol#.IPp/.vbcodd]
-
Nov 22nd, 2002, 05:48 PM
#3
Thread Starter
Addicted Member
-
Nov 22nd, 2002, 05:50 PM
#4
New Member
-
Nov 22nd, 2002, 06:02 PM
#5
Thread Starter
Addicted Member
-
Nov 22nd, 2002, 06:10 PM
#6
Frenzied Member
do you run your own webserver?
if so, and it supports PHP, just put this in a file,
PHP Code:
<?php
if (getenv("HTTP_X_FORWARDED_FOR") == "") {
// It Isnt A Proxy
echo getenv("REMOTE_ADDR");
}else{
// It Is A Proxy, Get the real EXTERNAL ip
echo getenv("HTTP_X_FORWARDED_FOR");
}
?>
and use the INet control to collect that instead,
it will only have to say do this:
VB Code:
' Just incase theres a error getting the IP from the php file etc
On Error GoTo ErrorSub:
' Get the IP Address Here
Dim MyIP As String
MyIP = INet1.OpenURL("http://Your-Server.com/Your-PHP-File.php")
' Do wotever wiv ur IP Address
MsgBox MyIP
' Stop it reporting an error if it isnt an error, by cutting off here.
Exit Sub
ErrorSub:
' If theres a problem connecting to the server
' the Err.Description = "Connection Timed Out"
Msgbox Err.Description
It would be way easier :P
Make sure theres no spaces above the:
<?php
or below the:
?>
U will need the Internet Controls (Or maybe Internet Transfer Controls, Its called INet any hows)
The page u posted, only shows the REMOTE_ADDR, so wouldnt b good if u have a Proxy Server (and a lot of Cable Access goes thru Proxy's to help stop the Code Red etc (or somethang like dat )
any how that will solve it 4 u hopefully
Last edited by wpearsall; Nov 22nd, 2002 at 06:14 PM.
Wayne
-
Nov 22nd, 2002, 06:16 PM
#7
Thread Starter
Addicted Member
I already know how to do that.. I want to know how to get the external ip without connecting to webservers or anything. just getting it from the computer.
i can do it that way. the problem is i just cant find a free site that has no ads and supports php
-
Nov 22nd, 2002, 06:32 PM
#8
-
Nov 22nd, 2002, 06:34 PM
#9
Thread Starter
Addicted Member
Alright thanks for trying to help.
-
Nov 22nd, 2002, 06:41 PM
#10
Frenzied Member
no problem, i have emailed the php code to that sites webmaster, if yer lucky, s/he mite change the code, so it will work propa 4 u ne howz
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
|