Php obtains xml data submitted through http post and parses xml. How does php obtain the xml data of the request, the xml data submitted by the other party through the http post protocol, and how does php obtain the xml data? Copy the code as follows :? Php $ xml_dataAATAvailReq1. php: how can I obtain the xml data of the request, and the xml data submitted by the other party through the http post protocol? how can php obtain the xml data?
The code is as follows:
$ 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 how to get the xml data of the request, the other party submitted xml data through the http protocol post, php how to get the data? The code is as follows :? Php $ xml_data = 'aatavailreq1 '....