zoukankan      html  css  js  c++  java
  • ip地址查询接口

    ip地址查询接口

    •  腾讯IP地址查询接口:http://fw.qq.com/ipaddress
    • 新浪IP地址查询接口:http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js
    • 搜狐IP地址查询接口:http://pv.sohu.com/cityjson
    • 谷歌IP地址查询接口:http://j.maxmind.com/app/geoip.js  未验证
    • 有道IP地址查询接口:http://www.youdao.com/smartresult-xml/search.s
    • 1616 IP地址查询接口:http://w.1616.net/chaxun/iptolocal.php
    • 126   http://ip.ws.126.net/ipquery
    • hao123  http://app.hao123.com/ipquery/getcity.php?rtype=2




    搜狐接口调用方法

    1. <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
    2. <script type="text/javascript">
    3. //默认为GBK可通过ie参数设置编码
    4. console.log(returnCitySN["cip"]+','+returnCitySN["cname"])//117.89.35.98,江苏省南京市
    5. </script>


    谷歌接口调用方法

    据说是谷歌的,不知道是不是真的。

    1. <script src="http://j.maxmind.com/app/geoip.js"></script>
    2. <script type="text/javascript">
    3. console.log(geoip_country_name()+','+geoip_region_name()+','+geoip_city())//China,Jiangsu,Nanjing
    4. </script>


    有道接口调用方法

    调用接口示例:http://www.youdao.com/smartresult-xml/search.s?type=ip&q=123.233.157.9

    返回XML数据

    <?xml version="1.0" encoding="gbk"?>
    <smartresult>
    <product type="ip">
    <ip>123.233.157.9</ip>
    <location>山东省济南市 网通</location>
    </product>
    </smartresult>

    或者

    http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&keyfrom=163.com&event=fYodaoCallBack&type=ip&q=192.168.1.1

    返回JSON数据

    fYodaoCallBack(1, {‘product’:'ip’,'ip’:’192.168.1.1′,’location’:'局域网 对方和您在同一内部网’} , ”);

  • 相关阅读:
    npm install、npm install --save与npm install --save-dev、npm install -g区别
    react的几种loader
    React的Sass配置
    react中使用css的7种方式
    linux安装字体
    反向代理和正向代理的解释
    开源Odoo ERP13.2版本模块功能
    Git+码云构建自己的共享仓库
    .Net Core的依赖注入
    libpcap使用(1)
  • 原文地址:https://www.cnblogs.com/inyu/p/13659081.html
Copyright © 2011-2022 走看看