从IP地址获取国家/地区,州,邮政编码和纬度和经度 [英] Get country, state, zip code and Latitude and Longitude from an ip address
本文介绍了从IP地址获取国家/地区,州,邮政编码和纬度和经度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
如何从IP地址获取国家/地区,州,邮政编码和纬度和经度?
是否有可用的免费api,它处于工作状态?我已经尝试过这么多api但它对我不起作用。
如果是google api那么最好。
谢谢,
kk
解决方案
您可以寻找(可能是免费的)网络服务。
Google [ ^ ]是你的朋友。
你找到了这个链接。
http://codingresolved.com/discussion/1117/get-location-of-visitor-from-ip-address/p1 [ ^ ]
Well完成。
现在,找到用户的ip地址,
string ipaddress;
ipaddress = Request.ServerVariables [ HTTP_X_FORWARDED_FOR];
if (ipaddress == || ipaddress == null )
ipaddress = Request.ServerVariables [ < span class =code-string> REMOTE_ADDR];
希望它可以帮到你。
谢谢。
最后我得到了解决方案。
http://codingresolved.com/discussion/1117/get-location-of-visitor-from-ip-address/p1 [ ^ ]
但我怎样才能获得ISP的IP地址?
谢谢。
hi all,
how to Get country, state, zip code and Latitude and Longitude from an ip address?
is there free api is available which is in working condition? i have tried so many apis but it didn't work for me.
if it is google api then it is most preferable.
Thanks,
kk
解决方案
You may look for a (possibly free) webservice.
Google[^] is your friend.
Hi,
You found this link.
http://codingresolved.com/discussion/1117/get-location-of-visitor-from-ip-address/p1[^]
Well done.
Now, to find users ip address,
string ipaddress; ipaddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (ipaddress == "" || ipaddress == null) ipaddress = Request.ServerVariables["REMOTE_ADDR"];
Hope it helps you.
Thanks.
finally i got solution.
http://codingresolved.com/discussion/1117/get-location-of-visitor-from-ip-address/p1[^]
but how can i get ISP ip address?
thanks.
这篇关于从IP地址获取国家/地区,州,邮政编码和纬度和经度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文