Hey guys,
We've written an RSS import feed which takes a given rss feed, strips most tags, except links, images, and a few other things.
We have an issue with images. We can link to the existing file on someone elses server just fine, but to avoid being a bandwidth theif, I'd like to download that image to our server, and link to it locally.
Any ideas how I can do this download transfer? Something with sockets I assume?
Thanks,
Josh
Save a file from another server
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
file_get_contents('http://the file')
fopen()-fwrite()-fclose()
str_replace() the original url with your now internalized copy.
fopen()-fwrite()-fclose()
str_replace() the original url with your now internalized copy.