Need some work done? Post a Project Today
A site I am building, is displaying boat listings from a local XML file. This contains for each listing, 1~20 different photos by URL.
I would rather them all be hosted on my site, instead of loading externally each time.
Open XML file
Start Loop for each [IMAGEURL] entry
- Get the image contents using file_get_contents
- Save image contents to local folder, using same filename
Find and replace all 'http://blablabla.com/images/' with '/' in the XML file - to make images load locally instead.