PHP get via HTTP protocol post submit XML data and parse xml_php tutorial

Source: Internet
Author: User
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 ' ....

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.