开发者

Is there any way to disable image downloads when scraping data using PHP cURL?

I just need text data. I can't find the answer to 开发者_开发百科it anywhere.


Well, cURL will not download the images, but only the HTML text. You might have image tags in there, but that doesn't make PHP download the appropriate images.


I am not familiar with cURL but you can use get filecontents

<?php
$homepage = file_get_contents('http://www.example.com/');
echo $homepage;
?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜