public static function downloadFile($src, $dst)
    {
        $result = false;

        $fileHandler = @fopen($dst, 'w');
        if (!is_resource($fileHandler)) {
            return $result;
        }

        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $src);
        curl_setopt($curl, CURLOPT_FILE, $fileHandler);
        curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
        $result = curl_exec($curl);
        curl_close($curl);
        fclose($fileHandler);

        return $result;
    }
public static function downloadFile($src, $dst)
    {
        $result = false;

        $fileHandler = @fopen($dst, 'w');
        if (!is_resource($fileHandler)) {
            return $result;
        }

        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $src);
        curl_setopt($curl, CURLOPT_FILE, $fileHandler);
        curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
        $result = curl_exec($curl);
        curl_close($curl);
        fclose($fileHandler);

        return $result;
    }
public static function downloadFile ( $ src , $ dst ) { $ result = false ; $ fileHandler = @ fopen ( $ dst , 'w' ) ; if ( ! is_resource ( $ fileHandler ) ) { return $ result ; } $ curl = curl_init ( ) ; curl_setopt ( $ curl , CURLOPT_URL , $ src ) ; curl_setopt ( $ curl , CURLOPT_FILE , $ fileHandler ) ; curl_setopt ( $ curl , CURLOPT_FOLLOWLOCATION , true ) ; $ result = curl_exec ( $ curl ) ; curl_close ( $ curl ) ; fclose ( $ fileHandler ) ; return $ result ; }
Download remote file using CURL

@param  string $src URL to file
@param  string $dst Filepath to the local result
@return boolean True on success, false otherwise
Download remote file using CURL