在网站中通过搜狐api显示ip地址

<script language=”javascript” type=”text/javascript” src=”http://pv.sohu.com/cityjson?ie=utf-8″></script>

<center>
<script>document.write(“你的IP是: “+returnCitySN.cip)</script>
</center>
<center>
<BR>
<script>document.write(“来自: “+returnCitySN.cname)</script>
</center>

搜狐api    http://pv.sohu.com/cityjson?ie=utf-8

返回json数据 var returnCitySN = {“cip”: “218.58.59.238”, “cid”: “370201”, “cname”: “山东省青岛市市辖区”};

这种数据是returnCitySN.cip;

var IPData = new Array(“58.218.198.205″,””,”江苏省”,”徐州市”);

这种数据是IPData[0]……