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 may google, there are lots of tutorials on how to work with curl. In your case you need to develop two parts on both servers:
The sender script could be alike:
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, array('file' => '@/path/to/file.txt'));
curl_setopt($ch, CURLOPT_URL, 'http://yoursecondserver.com/upload.php');
curl_exec($ch);
curl_close($ch);
How to receive file on the second server you may read up in the PHP manual, lots of examples http://php.net/manual/en/features.file-upload.php
Potentially you might want to use FTP connection, if have it installed on your servers, it might be even easier.