HomeASP HostingWeb DesignRegister DomainSupportAbout Us

Support :: FAQ

How to get the IP address of your visitors in ASP?
You can obtain the IP address of your visitors from the Request.ServerVariables collection. The following ASP script will display the visitorís IP on the screen:

<% Response.Write Request.ServerVariables("REMOTE_ADDR") %>

Why would you want to know what are your visitorsí IPs? There are several reasons why you might need their IP, for example:
  • You want to determine visitorsí geographical location and create geo-based statistics or you want to display different content depending on the IP (Google.com does that)
  • You can use the userís IP to create a unique cookie string and track your returning visitors or greet them appropriately.
© Copyright 2001-2004 Art Branch Inc.