用SAE做的淘宝IP数据库代理

接口(GET)

http://pubapi.sinaapp.com/api/qii

说明

木有淘宝IP库的10qps限制。。。至于SAE普通账户的实例能承受多大qps就不知道了。。。

BAE转移到BCE上真无语。。。碍于正常使用的BUG都没修完就上线。。。

集成淘宝IP数据库接口与新浪IP数据库接口。

2015-04-17 从BAE转移到了SAE...转移到BCE的BAE真不好用...


参数

  • /4 (查询IPv4地址)

  • /6 (查询IPv6地址,暂未实现)

  • /:IPversion/:IP (IP地址)


示例

GET http://pubapi.sinaapp.com/api/qii/4/114.114.114.114

BODY:

 {"tbip":{"code":0,"data":{"country":"\u4e2d\u56fd","country_id":"CN","area":"\u534e\u4e1c","area_id":"300000","region":"\u6c5f\u82cf\u7701","region_id":"320000","city":"\u5357\u4eac\u5e02","city_id":"320100","county":"","county_id":"-1","isp":"","isp_id":"-1","ip":"114.114.114.114"}},"sinaip":{"ret":1,"start":-1,"end":-1,"country":"\u4e2d\u56fd","province":"\u6c5f\u82cf","city":"\u5357\u4eac","district":"","isp":"","type":"","desc":""},"donate":"\u652f\u4ed8\u5b9d\u6350\u52a9\u8d26\u53f7\[email protected] (Alipay donation account: [email protected])"}



用到的开源库:Slim、Medoo

另外,SAE的Memcache的说明文档真少



你可能感兴趣的:(mysql,sae,淘宝IP库)