php http请求xml数据,php获取通过http协议post提交过来xml数据及解析xml
$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.jb51.net/article/32643.htm
總結
以上是生活随笔為你收集整理的php http请求xml数据,php获取通过http协议post提交过来xml数据及解析xml的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《强酒》第一句是什么
- 下一篇: 用php做一个简单的汇率,vue实现简单