使用PHP将图像文件从一个服务器移动到另一个服务器[关闭]

What's the best way without installing any new stuff or using a FTP to move an image from one server to another? how would you accomplish that ?

Can you use php CURL to take a file uploaded to a webserver and move it to a different server? Can you assign a file to $_FILES ?

a simple way is using file_get_contents

here is an example

$path = 'image.jpg';
$file = file_get_contents("http://yoursite.com/imagepath.jpg");
file_put_contents($path,$file);