Home >Backend Development >PHP Tutorial >PHP implements Aicha Express interface_PHP tutorial

PHP implements Aicha Express interface_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:51:501630browse

How to connect to Aicha Express interface

1. First go to Aicha Express http://www.ickd.cn/api/reg.html to apply for KEY. It is very fast, and the application is completed in a few minutes. Much better than Express 100, and the service is much better.

2. Create a form, submit data, and the sending address is: $url ='http://api.ickd.cn/?com='.$typeCom.'&nu='.$typeNu.'&id='. $key.'&type=html&encode=utf8';

Just bring in the value of the expression and you can submit it.

The implementation code is:

example.html

[html]
  
 
 
     
    快递单号获取接口API - Example 
     
     
     
     
     
     
 
  
 

 
   
 
 
 
       
 
         

快递公司: 
            
          快递单号: 
         

 
         

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

 
 
       
 
   
 
   
 
       

获取范例:

 
       
 
         
   
 




get.php

[php]

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




//echo '*****';
$typeCom = $_GET["expressid"];//Express company www.2cto.com
$typeNu = $_GET["expressno"]; //Express tracking number
$key='**********';//Tohttp://www.ickd .cn/api/reg.htmlApplication
$url ='http://api.ickd.cn/?com='.$typeCom.'&nu='.$typeNu.'&id='.$key.'&type=html&encode=utf8';
//echo $url;
$data = file_get_contents($url);
echo $data;
       
?>
Author: hljflp

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478156.htmlTechArticleMethod 1 to connect to Aicha Express interface, first go to Aicha Express http://www.ickd.cn/ api/reg.html applied for KEY very quickly, it took just a few minutes. Much better than Express 100, the service is also good...
Statement:
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
Previous article:PHP regular expression suffix_PHP tutorialNext article:PHP regular expression suffix_PHP tutorial

Related articles

See more