SQL PHP HTML ASP JavaScript articles and free scripts to download
 

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 HTTP_HOST to get the IP address. Here is the code.

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


The above IP value ( data ) can be used for various purposes.

Further readings
Collecting header information by using Request object in ASP
Collecting IP address of visitor from header data in ASP
Logging Referrer URL of a page in ASP
Sections
PHP
JavaScript
ASP
HTML
SQL
Photoshop
Articles SEO
All ASP Tutorials
ASP Sections
Ajax
Date and time
Declaring array
Form in ASP
Server.MapPath
Date Time & MSSQL
Select Query
File System Object
String Functions
Popular Tutorials
Managing two drop downs
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.