Php Express bill number query source code

Source: Internet
Author: User

Post a record to the php to query the source code of the express waybill number, which can be used to query the record of the express waybill number of various types of express parcels. It is not a problem for zhongtong, yuantong Express, and SF Express. You only need

Love Express (www.aikuaidi.cn) to apply for a courier key, the following share the source code, I tested, no problem. You can find the express delivery tracking information.

<? Php/*** query logistics information */define ('in _ ecs', true); require (dirname (_ FILE __). '/includes/init. php '); if ($ id = intval ($ _ REQUEST ['id']) {$ SQL _select = 'select consignee, mobile, tel, tracking_sn, shipping_code, shipping_name FROM '. $ GLOBALS ['ecs']-> table ('order _ info '). "WHERE order_id = $ id"; $ order_info = $ GLOBALS ['db']-> getRow ($ SQL _select ); // courier company code ing $ shipping_code = array ('EMS' => 'EMS', 'ems2 '=>' EMS ', 'Sto _ express '=> 'zjs', 'sto _ nopa' => 'zjs', 'zto' => 'zhongtong', 'sto' => 'shentong ', 'yto '=> 'yuyun G', 'sf' => 'shunfeng', 'emssn' => 'EMS', 'sf2' => 'shunfeng ', 'yunda' => 'yunda',); $ logistics_code = $ shipping_code [$ order_info ['shipping _ Code']? $ Shipping_code [$ order_info ['shipping _ Code']: $ order_info ['shipping _ Code']; $ aikuaidi_key = 'xxx '; love Express Application $ logistics_info = file_get_contents ($ logistics_url); // var_dump ($ logistics_info); // $ logistics_info = iconv ('gb2312', 'utf-8 ', $ logistics_info); echo <EOF <span> receiver: <strong >{$ order_info ['consignee']} </strong> </span> <span> contact number: <strong> {$ order_info ['mobile']} // {$ order_info ['tel']} </strong> </span> <span> delivery: <strong >{$ order_info ['shipping _ name'] }</strong> </span> <span> waybill number: <strong >{$ order_info ['tracking _ sn '] }</strong> </span> <br> EOF; echo $ logistics_info; echo "<br> <a href = '$ logistics_url 'target =' _ self '> click me </a>"; // exit ;}

  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.