423,867 Members | 1,958 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,867 IT Pros & Developers. It's quick & easy.

cURL - copy image file from one server to another

P: n/a
i would need help with creating some cURL code...

$old_file = "http://my_host.com/images/test.jpg";
$new_destination = "http://some_other_host.com/archived_images";

i was trying to create a cURL code that would copy the $old_file to a $new_destination but did not have much success...
basicaly i need to copy the file to the new server and if succedded, delete the original on old server

can somebody give me a hint with this?
Oct 26 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Rik
friglob wrote:
i would need help with creating some cURL code...

$old_file = "http://my_host.com/images/test.jpg";
$new_destination = "http://some_other_host.com/archived_images";

i was trying to create a cURL code that would copy the $old_file to a
$new_destination but did not have much success... basicaly i need to
copy the file to the new server and if succedded, delete the original
on old server
It would be a hell of a lot easier if you do it by FTP rather then cURL.
How do you propose you can delete a file by HTTP, or store (yes, PUT, very
rare)?
--
Rik Wasmus
Oct 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.