开发者

php curl - reading only html codes

php curl is reading style(css) files and downloading gifs,jpegs,pngs and everything. so curl is spending bandwith, 开发者_如何学运维and it is also taking times. actually i dont need images+css+etc. i only need to read html source codes..

well, is there a way to block images,css and other things while using php curl? so, curl works faster


If you point cURL at a URL of a website it will download only the source HTML. You have to manually fetch CSS, images and other attachments via additional cURL requests to each of the resources URLs.

If you are having performance issues with cURL, consider paralleling your requests using curl_multi_* functions. http://www.php.net/manual/en/function.curl-multi-init.php

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜