I\'ve been looking all over the place for the last two days and trying everything and still can\'t get anything to work. I feel like this should be a relatively simple thin
Use curl to download file from remote server like below.
$url = "http://path/toserver/filename";
$destination = "uploads/filename";
$fp = fopen ($destination, 'w+');
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_BINARYTRANSFER, true );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, false );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 10 );
curl_setopt( $ch, CURLOPT_FILE, $fp );
curl_exec( $ch );
curl_close( $ch );
fclose( $fp );
reference http://www.tricksofit.com/2014/04/download-file-from-remote-server-in-php