Results 1 to 8 of 8

Thread: IP Addy

  1. #1

    IP Addy

    I'm adding a "What's my IP" to part of my site but I'm not sure how do do it :/. Any suggestions?

  2. #2
    Senior Member
    Join Date
    Nov 2002
    Posts
    482
    um, unless you have a static IP address or you update the page daily, it cant really be done because you IP address changes every time you connect to your ISP. if you had a static IP (adsl)address you could find it out with simple IP tools (google.com or download.com) but then your computer has to be on 24/7, unless you get the same IP address next time you connect. i'm not sure on that though

    <edit> oops i mis-read your question. did you mean you want someone to go to your webpage and then click the link and find out what their addy is? well, if you do you will need a program i am sure, but i dont know which one. maybe someone on here knows, but just google around for ip shower or something like that. happy hunting. </edit>

    <edit2> or you could even re-direct them to a site that shows thier ip address, that way you dont need that hassle of implementing it, just let the other site do it. </edit2>

    sorry for my editing but i keep coming up with new ideas. :P
    - Trying is the first step towards failure. the moral is never try.
    - It\'s like something out of that twilighty show about that zone.
    ----Homer J Simpson----

  3. #3
    Senior Member
    Join Date
    Jan 2003
    Posts
    100
    trust_not_123 i think what he wants is to add a part on his webpage where people can go and find out what their ip address is .. unless he is running the site from home it doesnt matter about his home computer......... its really irrelevant in this thread whether his home is static or dynamic.

    livlee unfortunately i dont know how to do it but im sure a brief search on google.com could teach you or maybe just wait around a bit till someone comes on who knows
    Just because you don\'t see it doesn\'t mean it\'s not there

  4. #4
    Senior Member
    Join Date
    Nov 2002
    Posts
    482
    i realised what she meant Dahvid and edited my post while you were writing yours. sorry.
    - Trying is the first step towards failure. the moral is never try.
    - It\'s like something out of that twilighty show about that zone.
    ----Homer J Simpson----

  5. #5
    Senior Member
    Join Date
    Jan 2003
    Posts
    3,915
    The easiest way to do this would be to use Server Side Includes

    the line would be

    To do this you must make sure your server supports SSI and that the file is named with the appropriate naming conventions for SSI on your server.


    There's a great SSI Tutorial here: http://www.carleton.ca/~dmcfet/html/ssi.html

    SSI is great, and not used nearly often enough.

  6. #6
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    Use the CGI variable REMOTE_ADDR (this can also be accessed from PHP and ASP by $_SERVER['REMOTE_ADDR'] and Request.ServerVariables("REMOTE_ADDR") respectively)

    Check for an HTTP header "Via" - which indicates a proxy (will be mapped into a CGI variable HTTP_VIA). If it isn't present, the request probably came directly, and REMOTE_ADDR shows their real IP (although not if it was NAT'd, but that is impossible to detect)

    So if they use "Via", then you can't do it, otherwise it's easy.

  7. #7
    Kwiep
    Join Date
    Aug 2001
    Posts
    924
    Maybe this thing is a nice thing for you:
    http://www.xpenguin.com/ip-atlas.php
    it's the ip locator thing AO has in the tools&toys section. It shows the visitor ip and a map to locate were the visitor (or any ip entered) is. It doesn't pass proxies or something, but it's nice enough.
    Double Dutch

  8. #8
    Senior Member
    Join Date
    Mar 2002
    Posts
    502
    you could link it to a php file, and then put the following code in the file:
    PHP Code:
    <?php
    echo($REMOTE_ADDR);
    ?>
    Bleh.

Posting Permissions

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