获取XML,解析XML,提交XML
后端开发-php教程
php 如何获取请求的xml数据,对方通过http协议post提交过来xml数据,php如何获取到这些数据呢?筛选下拉列表源码,ubuntu 机器人,单台tomcat并发量,2011爬虫事件,南京php商城软件定制,刺客SEOlzw
<?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);
?>