如何使用php curl接收xml响应?
答
$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
什么是url,“http://www.example.com/path/to/service”应该是什么? – Michael 2011-01-14 07:44:28
http://php.net/manual/en/curl.examples-basic.php – deceze 2011-01-14 07:30:43