#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    2
    Rep Power
    0

    Getting viwers IP address


    Is there any way to get the IP address of a person who views your web site?
    I have a site that shows a person their IP address, but what kind of scripting do I need to have that address sent to me?

    Or is there an any easier way to get a person's IP address?
    Thanks
  2. #2
  3. Moderator Emeritus
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Austin, TX
    Posts
    7,188
    Rep Power
    2265
    In PHP its
    PHP Code:
    echo $_SERVER['REMOTE_ADDR']; 
    Here's a script that gets IP's done in Javascript, though it may be overkill for what you need:

    http://javascript.internet.com/user-...p-address.html
    DrGroove, Devshed Moderator | New to Devshed? Read the User Guide | Connect with me on LinkedIn
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    2
    Rep Power
    0
    ahh yes
    I actually found this site already. However, does this only give the user the IP address or does it make the address available to me also (and if so, how)?

    Thanks
  6. #4
  7. <!--REMOTE_ADDR-->
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Cali4nia
    Posts
    162
    Rep Power
    12
    If u use php or perl then u can save it in ur database and access it later

IMN logo majestic logo threadwatch logo seochat tools logo