Php curl Scrapping没有得到所有的HTML内容

时间:2015-10-08 16:32:10

标签: php curl

Php curl报废不从目标链接获取所有html内容" https://www.woolworths.com.au/Shop/SearchProducts?search=Fresh%20Apple" 所以请帮我整理废话

我的源代码是:

function getSslPage($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
curl_close($ch);
return $result;

}

$ curl = getSslPage(' https://www.woolworths.com.au/Shop/SearchProducts?search=Fresh%20Apple');

echo var_dump($ curl);

0 个答案:

没有答案