Keep in touch

you can keep in touch with my all blogs and sites by install this Toolbar...
http://rworldtoolbar.ourtoolbar.com/

Showing posts with label Get IP Address of Visitor's Machine. Show all posts
Showing posts with label Get IP Address of Visitor's Machine. Show all posts

Saturday, March 6, 2010

Get IP Address of Visitor's Machine

Dim ipaddress As String
ipaddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ipaddress = "" Or ipaddress Is Nothing Then
ipaddress = Request.ServerVariables("REMOTE_ADDR")
End If

When users use any proxies or routers the REMOTE_ADDR returns the IP Address of router or proxy and not the client user’s machine. So first we need to check HTTP_X_FORWARDED_FOR.