Page 1 of 1

Loading external images to local server

Posted: Fri Feb 08, 2008 4:01 am
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.

Re: Loading external images to local server

Posted: Fri Feb 08, 2008 4:21 am
by Kieran Huggins
it would probably be easier with bash, look into "wget"

Re: Loading external images to local server

Posted: Fri Feb 08, 2008 4:36 am
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.