Dmyers\Storage\Adapter\Base::remoteDownload PHP Method

remoteDownload() public method

Download a remote file locally.
public remoteDownload ( string $url, string $target ) : boolean
$url string The url to the remote file to download.
$target string The path to the local file to store.
return boolean
    public function remoteDownload($url, $target)
    {
        $client = new \GuzzleHttp\Client();
        try {
            $client->get($url, array('save_to' => $target));
        } catch (\GuzzleHttp\Exception\RequestException $e) {
            return false;
        }
        return true;
    }