re:
!> Also, keep in mind that there are proxy servers and other sorts of network-layer
!> entities which can lie to you about IP addresses. This sort of information is not reliable.
I thought that, even though the info is not reliable to pinpoint individual users, it's reliable
when
identifying the country of origin, except for those who deliberately spoof their IP address,
which must be a minuscule portion of the total number of surfers.
There's several options available, if you don't feel like rolling your own :
MaxMind's GeoIP:
http://www.maxmind.com/app/ip-location
The APIs are at :
http://www.maxmind.com/app/api
Check it out. If you like it, you may want to purchase their service.
You might also want to check out IP-to-country:
You can download their DB here :
http://www.webhosting.info/
They require you to create an account.
Both MaxMind and IP-to-country have free services which you can use, besides a for-pay product.
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en espaņol :
http://asp.net.do/foros/
===================================
"John Saunders" <john.saunders at trizetto.com> wrote in message
news:...
> "Mark Rae" <> wrote in message news:...
>> "bushi" <> wrote in message
>> news: oups.com...
>>
>>> i want to get the ipaddress,and the country name of a webpage
>>> visitor,using asp.Net(C#).if anyone knows about it,plz rply me.
>>
>> HttpContext.Current.Request.UserHostAddress
>>
>> You can then look up the IP address on one of the many websites which provide this sort of
>> information e.g. http://www.completewhois.com/
>>
>> However, there really is no point in doing this - IP addresses cannot be guaranteed to be
>> accurate because they are so easy to spoof...
>
> Also, keep in mind that there are proxy servers and other sorts of network-layer entities which
> can lie to you about IP addresses. This sort of information is not reliable.
>
> John
>
>