Results 1 to 10 of 10

Thread: External IP

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    154

    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.

  2. #2
    New Member
    Join Date
    Nov 2002
    Posts
    4
    tery dis:

    [Highlight=VB]Mserbox Winsack1.Lacol#.IPp/.vbcodd]

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    154
    ummhmm ok sure

  4. #4
    New Member
    Join Date
    Nov 2002
    Posts
    4
    you welca :0)))))

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    154
    uhh no thanks

  6. #6
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    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:
    1. ' Just incase theres a error getting the IP from the php file etc
    2. On Error GoTo ErrorSub:
    3. ' Get the IP Address Here
    4. Dim MyIP As String
    5. MyIP = INet1.OpenURL("http://Your-Server.com/Your-PHP-File.php")
    6. ' Do wotever wiv ur IP Address
    7. MsgBox MyIP
    8.  
    9. ' Stop it reporting an error if it isnt an error, by cutting off here.
    10. Exit Sub
    11. ErrorSub:
    12. ' If theres a problem connecting to the server
    13. ' the Err.Description = "Connection Timed Out"
    14. 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

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    154
    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

  8. #8
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    well, without connecting to a remote "Entity" of somesort, i really doubt it is possible, I Guess u can join some sort of chat session somewhere, and retrieve ur IP from dat, but other then that, No idea

    erm, (What is it u need this for, theres a cpl of sites / pages that do work properly and show the real ip etc or dat, so :shrugs
    Wayne

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    154
    Alright thanks for trying to help.

  10. #10
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    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
    Wayne

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width