Example #1
0
 /**
  * 快递的查询
  * @param string $trackNumber
  * @return array
  */
 public function query($trackNumber = 'TX901100035US')
 {
     $curl = new Curl();
     $xml = new Xml();
     $data = $this->buildXml($trackNumber);
     $request_xml = $xml->build($data);
     $response_xml = $curl->post($this->url, $request_xml);
     $response_arr = $xml->parse($response_xml);
     return $response_arr;
 }
Example #2
0
 /**
  * 路由查询
  */
 public function RouteService($express_id)
 {
     $model = new Model();
     $curl = new Curl();
     $xml = new Xml();
     //生成数据
     $data = $model->RouteService($express_id);
     //执行请求,解析数据
     $response_xml = $curl->post($data['url'], $data['data']);
     $response_arr = $xml->parse($response_xml);
     return $response_arr;
 }