I need the help to locate the region from where the ip is coming. I have to put that thing in my application like you are browsing from Bangalore, India. So please help me how to add this thing in website?
I need the help to locate the region from where the ip is coming. I have to put that thing in my application like you are browsing from Bangalore, India. So please help me how to add this thing in website?
Hi Rajesh,
There are a lot of free/paid web services that get this information for you (when you consume their web service). Alternatively, you can do this yourself. In order to get the browser's location that hits your website, you need to do these steps:
1. Get the IP address of the browser using C#.Net's HttpContext.Current.Request library
2. Correlate this IP address to the country code - location database (You can use the library from
CodeProject) and you will have the browser's location
Being said that, read this
blog for hands-on step by step guide
>I need the help to locate the region from where the ip is coming.
Get the location from an IP address can be very unrelaible. For example for the last 12 years I have not been out of the UK, yet such services had told me that I located in places such as Germany and the United States.
Even when they got the country right, the location within the country was often totally wrong.
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
rajesh_webin...
Member
8 Points
60 Posts
How to track the country location by getting visitor ip
Oct 15, 2008 04:12 PM|LINK
Hello Guys
I need the help to locate the region from where the ip is coming. I have to put that thing in my application like you are browsing from Bangalore, India. So please help me how to add this thing in website?
Thanks
Rajesh
Narmatha Bal...
Member
262 Points
41 Posts
Re: How to track the country location by getting visitor ip
Oct 15, 2008 05:53 PM|LINK
Hi Rajesh,
There are a lot of free/paid web services that get this information for you (when you consume their web service). Alternatively, you can do this yourself. In order to get the browser's location that hits your website, you need to do these steps:
1. Get the IP address of the browser using C#.Net's HttpContext.Current.Request library
2. Correlate this IP address to the country code - location database (You can use the library from CodeProject) and you will have the browser's location
Being said that, read this blog for hands-on step by step guide
http://reflexangle.blogspot.com
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: How to track the country location by getting visitor ip
Oct 16, 2008 05:32 PM|LINK
>I need the help to locate the region from where the ip is coming.
Get the location from an IP address can be very unrelaible. For example for the last 12 years I have not been out of the UK, yet such services had told me that I located in places such as Germany and the United States.
Even when they got the country right, the location within the country was often totally wrong.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239