Phpcurl gets incomplete information. this post is Last edited by hilives from 2014-12-0311: 48: 07 and used by & nbsp; php & nbsp; curl & nbsp; to obtain page data, there are 1000 pieces of data on the page. sometimes 1000 pieces of data can be obtained, and sometimes 500 and 600 pieces of data can be obtained. sometimes the results may be incomplete and the problem is solved. This is why $ ch & nbsp; & php curl retrieval information is incomplete
This post was last edited by hilives at 11:48:07
Use php curl to obtain page data. a page contains 1000 pieces of data. sometimes, you can obtain 1000 pieces of data. sometimes, you can obtain 500 and 600 pieces of data,
Sometimes it may be incomplete. solve the problem. why?
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_COOKIEJAR, "c:\cookie.txt");
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
$result = curl_exec ($ch);
curl_close($ch);
echo $result;
------ Solution ----------------------
Curl_setopt ($ ch, CURLOPT_TIMEOUT, 120 );
Let's take a look at this configuration 300.