Get Visitors IP Address

Discussion in 'ASP General' started by Keith, Feb 7, 2005.

  1. Keith

    Keith Guest

    How can I grab the IP address of a visitor to my site so I can store it in a
    session variable?

    Thanks
    Keith, Feb 7, 2005
    #1
    1. Advertising

  2. Keith

    Jeff Cochran Guest

    On Mon, 7 Feb 2005 23:26:54 -0000, "Keith" <@.> wrote:

    >How can I grab the IP address of a visitor to my site so I can store it in a
    >session variable?


    IPAddress = Request.ServerVariables("REMOTE_ADDR")

    Jeff
    Jeff Cochran, Feb 8, 2005
    #2
    1. Advertising

  3. Keith

    teknohippy Guest

    On Tue, 08 Feb 2005 03:40:51 GMT, (Jeff Cochran)
    wrote:

    >On Mon, 7 Feb 2005 23:26:54 -0000, "Keith" <@.> wrote:
    >
    >>How can I grab the IP address of a visitor to my site so I can store it in a
    >>session variable?

    >
    >IPAddress = Request.ServerVariables("REMOTE_ADDR")
    >
    >Jeff


    One word of warning, I have discovered to my downfall just yesterday
    that REMOTE_ADDR can have more than one IP address in it, it can be a
    comma separated list of IPs.

    So look out for that if you are processing them or any such thing.

    I

    --
    Iain Norman | http://www.eliteforum.org
    teknohippy, Feb 8, 2005
    #3
  4. "teknohippy" <> wrote in message
    news:...

    >
    > One word of warning, I have discovered to my downfall just yesterday
    > that REMOTE_ADDR can have more than one IP address in it, it can be a
    > comma separated list of IPs.


    How can that be?

    Ray at work
    Ray Costanzo [MVP], Feb 8, 2005
    #4
  5. Keith

    teknohippy Guest

    On Tue, 8 Feb 2005 10:52:10 -0500, "Ray Costanzo [MVP]" <my first name
    at lane 34 dot commercial> wrote:

    >
    >"teknohippy" <> wrote in message
    >news:...
    >
    >>
    >> One word of warning, I have discovered to my downfall just yesterday
    >> that REMOTE_ADDR can have more than one IP address in it, it can be a
    >> comma separated list of IPs.

    >
    >How can that be?
    >
    >Ray at work
    >

    Surprised me as well, I've not looked at the HTTP specs yet to see
    what it's all about.

    The client in question was going through some kind of web cache box
    thing.

    REMOTE_ADDR was being reported like this (just a random made up
    example)

    195.148.231.128, 10.0.1.124

    So I'm thinking it was the external IP of the cache machine and
    possibly the internal IP of the requesting client for some reason or
    another.

    I

    --
    Iain Norman | http://www.eliteforum.org
    teknohippy, Feb 8, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    363
  2. meltedown
    Replies:
    9
    Views:
    1,019
    Steve Pugh
    Oct 17, 2006
  3. Al Sashun

    Site visitors email address's required

    Al Sashun, Jul 29, 2003, in forum: Javascript
    Replies:
    4
    Views:
    118
    Richard Cornford
    Jul 30, 2003
  4. Paul Lee
    Replies:
    4
    Views:
    103
    Thomas 'PointedEars' Lahn
    Dec 12, 2003
  5. Îίκος Gr33k

    Geo Location extracted from visitors ip address

    Îίκος Gr33k, Jul 5, 2013, in forum: Python
    Replies:
    33
    Views:
    361
    Grant Edwards
    Jul 8, 2013
Loading...

Share This Page