开发者

How do I receive an xml response using php curl?

开发者 https://www.devze.com 2023-02-04 12:53 出处:网络
How do I receive an xml response using php curl?I don\'t need to manipulate the xml or store it or anything like that.I just need to receive it as plain xml.Does anyone k开发者_如何学编程now how to do

How do I receive an xml response using php curl? I don't need to manipulate the xml or store it or anything like that. I just need to receive it as plain xml. Does anyone k开发者_如何学编程now how to do this?


$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/path/to/service'); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec($ch);

$store contains response.

0

精彩评论

暂无评论...
验证码 换一张
取 消