Page 1 of 1

Download of webpage, including images

Posted: Mon Jun 22, 2009 7:16 am
by dwessell
Hi,

I'm trying to figure out how to grab the contents of a webpage, inlcuding the images.. It's a small page, it only contains two images. However the name and the src of those two images is different each time, so I can't simply do a wget or a curl for those images.

I had though I could use curl, and just get the webpage, but that grabs the html, and not the images.. Can someone point me in the right direction?

Thanks
David

Re: Download of webpage, including images

Posted: Mon Jun 22, 2009 7:30 am
by patrickmvi
You should use CURL to first grab the web page and then parse then extract the image names you need to download using REGEX and then download the files separately either using something like wget or file_get_contents with remote requests enabled.