php 如何擷取請求的xml資料,對方通過http協議post提交過來xml資料,php如何擷取到這些資料呢?
複製代碼 代碼如下:
$xml_data =''.
''.
'1234567890'.
'lgsoftwares'.
'mypassword'.
'phpmind.com'.
''.
''.
''.
''.
''.
''.
'JHM'.
'OGGSHE'.
'101009'.
'101509'.
'1'.
''.
'';
$URL = "https://www.yourwebserver.com/path/";
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_MUTE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
?>
http://www.bkjia.com/PHPjc/326221.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/326221.htmlTechArticlephp 如何擷取請求的xml資料,對方通過http協議post提交過來xml資料,php如何擷取到這些資料呢? 複製代碼 代碼如下: ?php $xml_data ='AATAvailReq1'....