PHP: send POST request then read XML response?

狂风中的少年 提交于 2019-12-05 19:12:10

use simplexml_load_string instead of simplexml_load_file

You have to set the cURL option to return the transfer

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

Instead of loading a file, you want to load a string.

// Instead of
$rxml = simplexml_load_file($response);

// You want
$rxml = simplexml_load_string($response);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!