Example #1
0
 public function queryPrinterStatus($device_no, $device_key)
 {
     /*  这里改了
     	$client = new HttpClient(FEIE_HOST,FEIE_PORT);
     	if(!$client->get('/FeieServer/queryprinterstatus?clientCode='.$device_no)){ //请求失败
     		return 'faild';
     	}
     	else{
     		$result = $client->getContent();
     		return $result;
     	} 
     	*/
     $client = new SoapClient("http://114.215.142.59:8080/kdtprint/services/printcenter?wsdl");
     $client->soap_defencoding = 'UTF-8';
     $client->decode_utf8 = false;
     $client->xml_encoding = 'UTF-8';
     $aryPara = array('deviceno' => $device_no, 'devicekey' => $device_key);
     $result = $client->getdevicestatus($aryPara);
     $result = json_decode(json_encode($result), true);
     return $result;
 }