Hey, i have a list of urls to images an another server(s). the list is stored in a database, and i was wondering if there is any way to save those images to my server just with the url of the image. dont worry, im not taking copy written images or anything like that. the site gives full permission for anyone to take their images or hotlink. i just would rather size them, as hotlinking will in the long run make my site and their site slower. i know i can just right click on the image and got to save-as...etc..., but that could take a long long long time with the number of images i need.
would something like this work? <?php $file = 'otherserverpath\filename'; $newfile = 'myserverpath\filename'; if (!copy($file, $newfile)) { echo "failed to copy $file...\n"; } ?> PHP:
Yes. otherserverpath - http://www.something... myserverpath - folder on your server. Example: /folder1/folder2/folder3/
good stuff, thanks for the help. ill give it a try when i get home and let you guys know if it works. Thanks again. Matthew