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