PHP implementation Love Check Express interface
The method of connecting the Love Check Express interface
First, to love to check the Courier http://www.ickd.cn/api/reg.html Application key, quickly, a few minutes to apply down. 100 better than express delivery, service is also much better.
Second, create the form, submit the data, send the address as: $url = ' http://api.ickd.cn/?com= '. $typeCom. ' &nu= '. $typeNu. ' &id= '. $key. ' &type=html&encode=utf8 ';
Just put the value of that expression in the line and you can submit it.
The implementation code is:
Example.html
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "><ptml xmlns=" http://www.w3.org/1999/xhtml "><pead><meta http-equiv=" Content-type "content=" text/html; Charset=utf-8 "/><title> Express number Get interface api-example</title><style> #retForm {width:640px;line-height : 22px;padding-bottom:10px;border-bottom:1px dotted #ccc;} #retData {background: #efefef;p adding:10px;line-height:18px;width:96%;border:0;}. txtpartner{width:960px;margin:20px 10px;padding:10px 0 0 0;border-top:1px solid #dfdfdf;}. Txtpartner h1{font-size:14px;color: #FF5632;}. Txtpartner a{float:left;margin:0 10px 10px 0;} Logo {font-size:18px;font-weight:bold;text-align:center;padding:10px;font-family: "Microsoft Jas Black";} . txturl {font-size:12px;padding:10px;} </style> <style>.ickd_return{font-family: "Trebuchet MS", Arial, Helvetica, Sans-serif; width:100%; Border-collapse:collapse;} TH,TD {font-size:1em; border:1px Solid #98bf21; padding:3px 7px 2px 7px; Text-align:center;} th{text-align:center;font-size:1.1em;padding-top:5px;padding-bottom:4px;background-color: #A7C942; color: #ffffff ;} tr.td{color: #000000; Background-color: #EAF2D3; }</style><style> #retForm {width:640px;line-height:22px;padding-bottom:10px;border-bottom:1px dotted # CCC;} #retData {background: #efefef;p adding:10px;line-height:18px;width:96%;border:0;}. txtpartner{width:960px;margin:20px 10px;padding:10px 0 0 0;border-top:1px solid #dfdfdf;}. Txtpartner h1{font-size:14px;color: #FF5632;}. Txtpartner a{float:left;margin:0 10px 10px 0;} Logo {font-size:18px;font-weight:bold;text-align:center;padding:10px;font-family: "Microsoft Jas Black";} . txturl {font-size:12px;padding:10px;} </style></pead> <body> <!--<form action= "kuaidi.php" method= "get" >--<p> Express Company: <input name= "Expressid" type= "text" id= "Expressid"/> Express Number: <input name= "Expressno" type= "text" Id= "Expressno "/> </p> <p> Description: Two parameters to be sent when querying: Company name (pinyin or English); Courier number </p><input type=" submit "value=" Query "I D= "Btnsnap" class= "Btnsnap"/><p> get example:</p></body> </ptml>
get.php
<textarea readonly="" name="code" class="php"><?phpheader (' content-type:text/html;charset=utf-8 ');//echo ' * * * * * *; $typeCom = $_get["Expressid"];//Express Company $ Typenu = $_get["Expressno"]; Courier number $key= ' ********** ';//to http://www.ickd.cn/api/reg.html apply for the ' http://api.ickd.cn/?com= '. $typeCom. ' &nu= '. $typeNu. ' &id= '. $key. ' &type=html&encode=utf8 '; echo $url; $data = file_get_contents ($url); Echo $data;? ></textarea>
A total of written code on these, I hope to help you, if there is a problem in time to contact qq:523132661.