`

获取你的外网IP

阅读更多
    前两天我们服务器的apache获取到的客户端外网IP不是很正确,估计是我们托管的机房的dns解析有问题或者是多层网路代理的问题,具体原因没办法证实。
    如果有多种原因做不到,我们也可以通过第三方的来获取,例如:
<html>  
 <head>  
  <title>demo</title>  
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>  
  <script type="text/javascript" src="http://fw.qq.com/ipaddress" charset="GBK"></script>
  <script type="text/javascript">
   document.write("IP地址:" + IPData[0]  + "</br>");
   document.write("所在省:" + IPData[2]  + "</br>");
   document.write("所在市:" + IPData[3]  + "</br>");
  </script>
  </head>
  <body></body>
</html>
0
1
分享到:
评论
1 楼 cheung1021 2011-12-30  
http://fw.qq.com/ipaddress,这个网站瘫痪了

相关推荐

Global site tag (gtag.js) - Google Analytics