...

View Full Version : how to get ip of the visitors



Jaffar21
03-15-2007, 03:27 PM
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

jim_denney
03-15-2007, 03:32 PM
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.

nexosis
03-15-2007, 03:48 PM
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?

jim_denney
03-15-2007, 06:11 PM
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.

SSJ
03-16-2007, 07:05 AM
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...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum