IP Address

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

    #1

    IP Address

    Not sure if there is a javascript for this or not, but thought i'd ask!
    I want to grab the IP address of person's logging into my webpage. Is there
    a variable that it is stored in?



  • Andrew Urquhart

    #2
    Re: IP Address

    Robin wrote:[color=blue]
    > Not sure if there is a javascript for this or not, but thought i'd
    > ask!
    > I want to grab the IP address of person's logging into my webpage.
    > Is there a variable that it is stored in?[/color]

    In javascript no. In JScript I think there is (via WScript.Network ?) and
    plugins/applets/etc with javascript interfaces may be able to pass this
    information out, but both of these are useless in a general WWW
    environment.

    However, it's probably quite useless to attempt to know the IP address
    anyway. For example, my local ISP uses a 'transparent' cache upstream
    for all HTTP traffic and the outside world only ever sees one IP address
    for the several thousand people using the cache server. Recording IP
    address is often used on opinion polls to limit duplicate entries, but I
    know if I'm not logged into Slashdot then it regularly bars me from
    voting because someone in a nearby town already has!
    --
    Andrew Urquhart
    - FAQ: www.jibbering.com/faq/
    - Archive: www.google.com/groups?q=comp.lang.javascript
    - Contact: www.andrewu.co.uk/contact/
    - Employ me: Front/middle tier ASP developer with WAI & web standards


    Comment

    Working...