How write code in ASP to get website visitors IP address and Country ID ?
Plz help me, Alex
How write code in ASP to get website visitors IP address and Country ID ?
Plz help me, Alex
Typically solutions like GeoIP are used to locate an IP address down to a geographical location.
First you need the IP, this is reported by your server software. Read the REMOTE_ADDR server header with: Request.ServerVariables(REMOTE_ADDR)
For the country, a popular tool is GeoIP, there are some ASP implementations. Google for GeoIP ASP and you will find a solution.
first, this has nothing to do with javascript. second, ip address is usually within the request headers, now you tagged this under java and asp where both provides different ways to retrieve the ip address info (with asp is the REMOTE_ADDR variable).
Once you have the IP address you can perform a lookup query in IP2Country table which are available for free on the net.
You simply should download the csv file and add it to your database
start here: http://software77.net/geo-ip/