开发者

get ip address of web user

开发者 https://www.devze.com 2022-12-10 04:48 出处:网络
are there any free web services out there that will detect the IP Address of the开发者_如何学运维 user accessing your site, and then give you information like zip code, and local?

are there any free web services out there that will detect the IP Address of the开发者_如何学运维 user accessing your site, and then give you information like zip code, and local?

I am using C# on VS2008.


Request.ServerVariables["REMOTE_ADDR"] to get the IP?

I believe you can use http://www.ip2location.com/


If you want to store that database of IPs locally, you could use Maxmind, it has a C# API and a free IP->location database (and more accurate paid one).

Check this old SO thread for some web services.

0

精彩评论

暂无评论...
验证码 换一张
取 消