fcitx
V2EX  ›  问与答

调用Sina的IP地址API

  •  
  •   fcitx · Jun 23, 2012 · 4178 views
    This topic created in 5099 days ago, the information mentioned may be changed or developed.
    有个地方要禁止某地区的IP访问,所以用JS调用了新浪的api:

    http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js

    但是发现页面在这里大约要卡两秒多,请问有没有更高效的方式?
    5 replies    1970-01-01 08:00:00 +08:00
    manhere
        1
    manhere  
       Jun 23, 2012
    http://int.dpool.sina.com.cn/iplookup/iplookup.php 更直观
    不过,用JS禁用IP,这招很怪呀。禁用不是应该在服务器那边吗?
    fcitx
        2
    fcitx  
    OP
       Jun 23, 2012
    不大想在服务端搞个庞大的IP数据库。
    cjou
        3
    cjou  
       Jun 23, 2012
    iptables 直接屏蔽那个地区ip段
    tomheng
        4
    tomheng  
       Jun 23, 2012
    不是正式开放的API,可能会有限制
    r4ntix
        5
    r4ntix  
       Jun 23, 2012
    淘宝这边有个IP 地址库,可以一试:
    http://ip.taobao.com/instructions.php
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3206 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 11:30 · PVG 19:30 · LAX 04:30 · JFK 07:30
    ♥ Do have faith in what you're doing.