How does PHP obtain the requested XML data, and the other party submits the XML data via the HTTP protocol post, and how does PHP get the data?
Copy CodeThe 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.html www.bkjia.com true http://www.bkjia.com/PHPjc/326221.html techarticle How does PHP obtain the requested XML data, and the other party submits the XML data via the HTTP protocol post, and how does PHP get the data? Copy the code as follows: PHP $xml _data = ' AATAvailReq1 ' ....