I\'m developing a website in a server and the storage is in another server and I have to deal with that somehow. I nerve experience this case and I found that the solution i
You can upload file on another server using posting the file.
$request = curl_init('http://example.com/');
// send a file
curl_setopt($request, CURLOPT_POST, true);
curl_setopt(
$request,
CURLOPT_POSTFIELDS,
array(
'file' => '@' . realpath('example.txt')
));
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($request);
curl_close($request);
You can handle the Uploaded file using $_FILES['file']