Created
June 29, 2013 09:28
-
-
Save caok/5890513 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
通过json访问新浪ip数据库,可以获得相应城市的ip地址。 | |
例行惯例,不解释: | |
<script type="text/javascript" > | |
$(document).ready(function(){ | |
jQuery.getScript("http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js", function(){ | |
alert("province : "+remote_ip_info.province+", city : "+remote_ip_info.city); | |
}); | |
}); | |
</script> | |
这里还有其他的ip地址共享: | |
http://pv.sohu.com/cityjson?ie=utf-8 | |
http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=218.192.3.42 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.yovisun.com/sina-wangyi-ip-addr-api.html