Loading external images to local server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
masterkrang
Forum Newbie
Posts: 10
Joined: Wed Jan 23, 2008 6:45 pm

Loading external images to local server

Post by masterkrang »

Hi, I have to write a script that fetches files from other servers (based on absolute url's), and I was wondering how any of you guys might approach it in php. I'm thinking that this might be better done with a bash script, but not sure. Either way, I will have a new set of images every morning that need to be loaded onto the local server. I would just do it manually, but that would be way too time consuming, as there are 1000's of images. If anybody can point me in the right direction, that would be cool, thanks.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: Loading external images to local server

Post by Kieran Huggins »

it would probably be easier with bash, look into "wget"
masterkrang
Forum Newbie
Posts: 10
Joined: Wed Jan 23, 2008 6:45 pm

Re: Loading external images to local server

Post by masterkrang »

Yeah, I kinda figured I would use wget. Thanks. The main reason I wanted to use php is because I already have the script that parses the image names out in php. I wonder, you think it would be a good idea just to write the script in php, then issue system calls from php that use wget to load the images? Thanks.
Post Reply