我正在寻找一些关于我的CurL代码的帮助。我试图执行多个URL,但它只运行最后的结果。发送多个CuRL请求
这里是我的代码:
function executeCurl($data) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, trim($data['url']));
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HEADER, 0);
//execute post
$result = curl_exec($ch);
curl_close($ch);
unset($data,$url,$ch);
//close connection
}
林在循环运行executeCurl但只执行最后的结果。
你并不真的需要取消设置的语句。另外,不知何故,我不认为这个问题是在这个代码中。 – 2013-03-06 05:46:05
您正在使用阻止卷曲界面。 – 2013-03-06 05:46:44