How to get clientside IP-addr

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Cook

    How to get clientside IP-addr

    Is it possible in Javascript to determine the numerical
    IP-addr that the client is using?

    (Normally, I'd do this on the server-side, where it is trivial.)

    But, I'm just curious how to do it on the client-side if it's
    possible. Of course, in general, the client IP-addr wouldn't
    even be relevant if the current page/document came from
    a 'file://' URL, but I'm assuming if the current document
    came from a (non-local) http:// URL, then maybe both
    the server and the CLIENT ip-address could be acquired
    somehow.

    Can it be done?


  • Hywel

    #2
    Re: How to get clientside IP-addr

    In article <f5mdnQU68YDYk4 jcRVn-sA@comcast.com> , says...[color=blue]
    > Is it possible in Javascript to determine the numerical
    > IP-addr that the client is using?
    >
    > (Normally, I'd do this on the server-side, where it is trivial.)
    >
    > But, I'm just curious how to do it on the client-side if it's
    > possible. Of course, in general, the client IP-addr wouldn't
    > even be relevant if the current page/document came from
    > a 'file://' URL, but I'm assuming if the current document
    > came from a (non-local) http:// URL, then maybe both
    > the server and the CLIENT ip-address could be acquired
    > somehow.
    >
    > Can it be done?[/color]

    Wouldn't you already know the server's IP address? After all, that's
    where the page is coming from. As for the client IP, it's relatively
    useless when you consider that move users connect through some sort of
    proxy (transparent or otherwise) that means the thousands of users have
    the same IP address.




    --
    Hywel


    Comment

    • Michael Winter

      #3
      Re: How to get clientside IP-addr

      On Sat, 7 Aug 2004 13:15:48 -0400, David Cook <(who wants to know?)> wrote:
      [color=blue]
      > Is it possible in Javascript to determine the numerical
      > IP-addr that the client is using?[/color]

      [snip]

      I don't believe so; I can't think of any way off the top of my head. Check
      the group archives with Google. I'm sure this has been covered before.

      Mike

      --
      Michael Winter
      Replace ".invalid" with ".uk" to reply by e-mail

      Comment

      • Grant Wagner

        #4
        Re: How to get clientside IP-addr

        David Cook wrote:
        [color=blue]
        > Is it possible in Javascript to determine the numerical
        > IP-addr that the client is using?
        >
        > (Normally, I'd do this on the server-side, where it is trivial.)
        >
        > But, I'm just curious how to do it on the client-side if it's
        > possible. Of course, in general, the client IP-addr wouldn't
        > even be relevant if the current page/document came from
        > a 'file://' URL, but I'm assuming if the current document
        > came from a (non-local) http:// URL, then maybe both
        > the server and the CLIENT ip-address could be acquired
        > somehow.
        >
        > Can it be done?[/color]

        In addition to what others have said, you should understand what
        "client" IP-addr you are referring to.

        1) are you referring to the private (typically) non-routable IP
        address the computer on my LAN has (192.168.0.x)? This can be
        obtained in some versions of Netscape, but since it is a private
        (typically) non-routable IP address that is also assigned to
        possibly thousands of other computers around the world, it's not
        very useful.
        2) are you referring to the IP address assigned to my gateway by my
        ISP? This can not be obtained using any mechanism I know of if I'm
        using a proxy.
        3) are you referring to the IP address of the proxy which I use to
        browse the Web? This can be easily obtained by the server.

        --
        Grant Wagner <gwagner@agrico reunited.com>
        comp.lang.javas cript FAQ - http://jibbering.com/faq

        Comment

        Working...