这是我在 CURL 中设置的选项。
curl_setopt($curlHandler[$j]->curl, CURLOPT_URL,$arr[$j]->URL);
curl_setopt($curlHandler[$j]->curl, CURLOPT_FAILONERROR, true);
curl_setopt($curlHandler[$j]->curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curlHandler[$j]->curl, CURLOPT_AUTOREFERER, true);
curl_setopt($curlHandler[$j]->curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curlHandler[$j]->curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curlHandler[$j]->curl,10);
当我执行 PHP curl。curl_getinfo 返回以下数组。
Array
(
[url] => http://davidchartier.com/post/395028979/replies
[content_type] => text/html; charset=UTF-8
[http_code] => 404
[header_size] => 669
[request_size] => 224
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 1
[total_time] => 1.939753
[namelookup_time] => 0.079254
[connect_time] => 0.099593
[pretransfer_time] => 0.099693
[size_upload] => 0
[size_download] => 21201
[speed_download] => 10929
[speed_upload] => 0
[download_content_length] => 255
[upload_content_length] => 0
[starttransfer_time] => 1.759269
[redirect_time] => 0.129832
[certinfo] => Array
(
)
[redirect_url] =>
)
<b>Warning</b>: (null)(): 136 is not a valid cURL handle resource in <b>Unknown</b> on line <b>0</b><br />
<br />
请帮助我。感谢任何帮助。