2
有沒有什麼辦法來檢索curl_setopt POSTFIELDS字符串,我已經發布到網站後curl_multi_exec($ mh,$運行)命令?php檢索curl_setopt POSTFIELDS字符串
謝謝。
有沒有什麼辦法來檢索curl_setopt POSTFIELDS字符串,我已經發布到網站後curl_multi_exec($ mh,$運行)命令?php檢索curl_setopt POSTFIELDS字符串
謝謝。
你必須與個人資源一起保存這些數據:
$handles = array();
foreach ($urls as $url) {
$ch = curl_init($url);
$data = 'whatever';
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$handles[$url] = array(
'ch' => $ch,
'data' => $data,
);
}
這在一個單一的結構,你可以在以後用它來檢查保持捲曲處理和數據一起。
foreach($handles as $url => $data) {
// $url is the page you requested for this particular handle
// $data['data'] contains the data that goes with it
$body = curl_multi_getcontent($data['ch']);
curl_multi_remove_handle($mh, $data['ch']);
curl_close($data['ch']);
}