开发者

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

开发者 https://www.devze.com 2022-12-11 20:55 出处:网络
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 mak

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

精彩评论

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