php获取通过http协议post过来的xml数据
时间:2021-07-01 10:21:17
帮助过:23人阅读
- $xml_data =''.
- ''.
- '1234567890'.
- 'lgsoftwares'.
- 'mypassword'.
- 'phpmind.com'.
- ''.
- ''.
- ''.
- ''.
- '
'. - ''.
- 'JHM'.
- 'OGGSHE'.
- '101009'.
- '101509'.
- '1'.
- '
'. - '';
- $URL = "https://www.abc.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);
- ?>
|