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;
?>
精彩评论