PHP实现爱查快递接口_PHP教程

WBOY
Release: 2016-07-13 17:51:50
Original
1529 people have browsed it

连接爱查快递接口的方法

一、首先去爱查快递http://www.ickd.cn/api/reg.html申请KEY,很快的,几分钟就申请下来了。比快递100好多了,服务也好多了。

二、创建表单,提交数据,发送地址为:$url ='http://api.ickd.cn/?com='.$typeCom.'&nu='.$typeNu.'&id='.$key.'&type=html&encode=utf8';

只要把表达那的值带进去就行了,就可以提交了。

实现代码为:

example.html

[html]




快递单号获取接口API - Example














快递公司:

快递单号:


说明:查询时需要发送两个参数:公司名(拼音或英文);快递单号






获取范例:



PHP实现爱查快递接口_PHP教程





get.php

[php]

header('Content-type:text/html;charset=utf-8');




//echo '*****';
$typeCom = $_GET["expressid"];//快递公司 www.2cto.com
$typeNu = $_GET["expressno"]; //快递单号
$key='**********';//到http://www.ickd.cn/api/reg.html申请
$url ='http://api.ickd.cn/?com='.$typeCom.'&nu='.$typeNu.'&id='.$key.'&type=html&encode=utf8';
//echo $url;
$data = file_get_contents($url);
echo $data;

?>
作者:hljflp

www.bkjia.com true http://www.bkjia.com/PHPjc/478156.html TechArticle 连接爱查快递接口的方法 一、首先去爱查快递http://www.ickd.cn/api/reg.html申请KEY,很快的,几分钟就申请下来了。比快递100好多了,服务也好...
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!