Yesterday i saw a site in which, site is listing the ip address and country name, saying that recently visited members (a list of ip address with country name,city name). Can i know how can i track that information any reference or any code. Thank You.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Pls check these questions
Detect/estimate country of a http-request in ASP.NET
How to get visitor location ( country, state and city ) using ASP.NET
https://stackoverflow.com/questions/372591/how-to-get-city-country-and-country-code-for-a-particular-ip-address-in-asp-net
回答2:
http://www.codeproject.com/Articles/709429/IPLite-NET-Get-Country-Region-City-From-IP
in essence you need a fresh simple 900KB ip to country database to use this method from https://lite.ip2location.com/
in my experience old dll (2008) like https://worlddomination.codeplex.com/ did not worked and return null for countries like Iran