How to get IP address of the visitor browser in ASP

We can collect IP address of the visitor by using Request object and its ServerVariable pairs. IP address of the user is required in many applications for different purposes. IP address are collected and logged for security purposes on different occasions like credit card process, member signup time etc. From the IP address we can identify the location of the visitor. However we will restrict ourselves only to know how to collect IP address of the visitor browser from the HTTP header information.

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.

Be the first to post comment on this article :

plus2net.com




Post your comments , suggestion , error , requirements etc here .




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