Page 1 of 1

using php curl in text only mode like lynx browser

Posted: Sat Aug 13, 2011 8:03 am
by kc11
Hi,

I am trying to access a number of websites using curl. It seems to me that the some pages are slow to load, because of the time that it takes to populate the advertisements on the pages. Is there a way to use CURL in a 'text only' fashion, that will retrieve only the HTML ( which is all I'm interested in ) .

Thanks,

KC

Re: using php curl in text only mode like lynx browser

Posted: Sat Aug 13, 2011 9:52 am
by John Cartwright
cURL will ONLY grab the HTML contents and not the external resources (such as images, js, flash). However, if you render the HTML from cURL by outputting it to the browser, then you will load all the external resources (NOT cURL).

Re: using php curl in text only mode like lynx browser

Posted: Sun Aug 14, 2011 8:18 pm
by kc11
Thanks John, you've solved it and I'm not echoing the html output any longer. - Thank you - KC