Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to get ip of the visitors

    hi, i want to get client ipaddress those who are all visiting my page.

    i have one listbox in my clientip.aspx.so i need to display the list of ipaddress those who are all visiting my webpage.

    can any one show mw some example regarding this please

  • #2
    New Coder
    Join Date
    Jan 2003
    Location
    Illinois
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dim UserIPAddress
    UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
    If UserIPAddress = "" Then
    UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
    End If

    That should take care of it.

  • #3
    Regular Coder nexosis's Avatar
    Join Date
    Dec 2006
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jim_denney View Post
    Dim UserIPAddress
    UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
    If UserIPAddress = "" Then
    UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
    End If

    That should take care of it.
    Anyways, I have 2 connection areas, and If I switched to the another connection will it change the ip adress?

    progress: HTML: 100% > CSS: 90% > Javascript: 55% > Php:10%
    Want an avatar like mine? it's free! just pm me.

  • #4
    New Coder
    Join Date
    Jan 2003
    Location
    Illinois
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would assume so. I am probably not the right person to ask. The IP address is retrieved from your computer, but if you have more than one computer and are behind a firewall, it may or may not change, depending on how your firewall handles it. You may just be receiving the IP address where the firewall resides.

    You would have to try it to see, but that just means putting the code into an ASP page, displaying your IP address and then hitting the same page from the other location.

  • #5
    SSJ
    SSJ is offline
    Regular Coder
    Join Date
    Mar 2007
    Posts
    230
    Thanks
    0
    Thanked 4 Times in 4 Posts
    I would assume so. I am probably not the right person to ask. The IP address is retrieved from your computer, but if you have more than one computer and are behind a firewall, it may or may not change, depending on how your firewall handles it. You may just be receiving the IP address where the firewall resides.
    I think this is perfect...


  •  

    Posting Permissions

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