Forum Moderators: coopster

Message Too Old, No Replies

curl - download jpgs as well?

         

jackvull

3:27 am on Jan 19, 2010 (gmt 0)

10+ Year Member



I am downloading a webpage to send myself by email automatically when an update occurs.
This webpage has jpgs in it but they don't seem to appear in the email I receive - must be something to do with the fact that the HTML references the files relatively rather than absolutely. Is there a way to download them in curl or do I have to replace all img links in the saved file?

omoutop

2:05 pm on Jan 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



well, i think that you get the actual source code of the page. So yes, a replace must be done for all relative files (images, styles,scripts, etc) if you want to see/store the full page.
Or alternative, you can write a seperate curl function to get you only the images and save them where you save the page data

jackvull

2:14 pm on Jan 19, 2010 (gmt 0)

10+ Year Member



What function in curl will download the images without knowing the filenames?

Seb7

4:37 pm on Jan 19, 2010 (gmt 0)

10+ Year Member



curl doesnt have this function. You would have to find the image urls yourself within the page, and run seperate curl commands.