$url3 = "http://cocatalog.loc.gov/cgi-bin/Pwebrecon.cgi?DB=local&PAGE=First";
$ch3 = curl_init(); //2nd curl to search ASIN
curl_setopt($ch3, CURLOPT_URL,$url3);
curl_setopt($ch3, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch3, CURLOPT_TIMEOUT, 15);
curl_setopt($ch3, 156, 2500);
curl_setopt($ch3, CURLOPT_GETFIELDS,"?Search_Arg=$Kindletitle&Search_Code=TALL&CNT=25&HIST=1");
curl_setopt($ch3, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch3, CURLOPT_FOLLOWLOCATION, true);
$copyrightrecordresponse = curl_exec($ch3);
curl_close($ch3);
试图做一个GET请求,下面的搜索形式,但我得到的错误 curl_setopt()预计参数2长,串给出卷曲GET请求的搜索表单
为什么你使用这个** curl_setopt($ CH 3,156,2500); **在你的代码。我认为这是给错误 – 2013-05-06 08:04:15
@DarkWish CURLOPT_CONNECTTIMEOUT_MS有156 – 2013-05-06 09:45:41
然后使用这些** CURLOPT_TIMEOUT_MS应该是155 **和** CURLOPT_CONNECTTIMEOUT_MS应该是156 ** [见这里](http://www.php.net/manual /en/function.curl-setopt.php#107314) – 2013-05-06 09:50:37