fcitx
V2EX  ›  问与答

调用Sina的IP地址API

  •  
  •   fcitx · Jun 23, 2012 · 4588 views
    This topic created in 5252 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
    manhere
    Jun 23, 2012
    1
    http://int.dpool.sina.com.cn/iplookup/iplookup.php 更直观
    不过,用JS禁用IP,这招很怪呀。禁用不是应该在服务器那边吗?
    fcitx
    fcitx
    OP
    Jun 23, 2012
    2
    不大想在服务端搞个庞大的IP数据库。
    cjou
    cjou
    Jun 23, 2012
    3
    iptables 直接屏蔽那个地区ip段
    tomheng
    tomheng
    Jun 23, 2012
    4
    不是正式开放的API,可能会有限制
    r4ntix
    r4ntix
    Jun 23, 2012
    5
    淘宝这边有个IP 地址库,可以一试:
    http://ip.taobao.com/instructions.php
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2002 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 00:10 · PVG 08:10 · LAX 16:10 · JFK 19:10
    ♥ Do have faith in what you're doing.