Home > php教程 > PHP源码 > body text

常用的API接口,返回JSON格式的服务API接口

PHP中文网
Release: 2016-05-23 17:09:21
Original
1854 people have browsed it

常用的API接口,返回JSON格式的服务API接口

php代码

快递接口:
http://www.kuaidi100.com/query?type=快递公司代号&postid=快递单号 
ps:快递公司编码:申通="shentong" EMS="ems" 顺丰="shunfeng" 圆通="yuantong" 中通="zhongtong" 韵达="yunda" 天天="tiantian" 汇通="huitongkuaidi" 全峰="quanfengkuaidi" 德邦="debangwuliu" 宅急送="zhaijisong"
Copy after login

php代码

谷歌接口
FeedXml转json接口:
http://ajax.googleapis.com/ajax/services/feed/load?q=Feed地址&v=1.0
备选参数:callback:&callback=foo就会在json外面嵌套foo({})方便做jsonp使用。 
备选参数:n:返回多少条记录。
Copy after login

php代码

百度百科接口:
http://baike.baidu.com/api/openapi/BaikeLemmaCardApi?scope=103&format=json&appid=379020&bk_key=关键字&bk_length=600
查询出错示例如下:查看原始页面 {"error_code":"20000","error_msg":"search word not found"}
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template