How to get IP address of the visitor browser in ASP

<%= Request.ServerVariables("REMOTE_ADDR")%>

Request.ServerVariables("REMOTE_ADDR") returns the network address visible to IIS for the current connection.

Behind a reverse proxy, CDN or load balancer, this may be the proxy address rather than the visitor's original address. Forwarded-IP headers should only be trusted when they are set and sanitized by infrastructure you control. An IP address is also not a reliable proof of a person's identity or precise location.



In PHP we can find out the IP address and details are here.

In ASP as we will use the http header information so it is better to read the full article on http header and request object here.

We will use http header name REMOTE_ADDR or REMOTE_HOST to get the IP address. Here is the code.
<%= Request.ServerVariables("REMOTE_ADDR")%>
The above IP value ( data ) can be used for various purposes.
Referrer Cookies
ASP Home






✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer