<< ibec_DecompressVar | IBEBlock | ibec_url_DownloadToVar >>

ibec_url_DownloadToFile

This function is intended for downloading the content of a specified URL to a named file.

Syntax

 function ibec_url_DownloadToFile(URL : string; FileName : string; Options : variant) : Boolean;

Description

The ibec_url_DownloadToFile function saves downloaded data in a file specified by the FileName parameter.

Both this and the ibec_DownloadToVar function try to download the data from the specified HTTP or FTP URL. If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE.

Parameters

The Options parameter is reserved for future use.

Example

    Res = ibec_url_DownloadToFile('http://www.ibexpert.com/download/setup.exe',
                                  'd:\downloads\ibexpert.exe', '');
    if (Res) then
      ibec_ShowMessage('Downloaded successfully');
    ...
    MyVar = null;
    Res = ibec_DownloadToVar('http://www.ibexpert.com/download/setup.exe',
                             MyVar, '');
    if (Res) then
      ibec_SaveToFile('d:\downloads\ibexpert.exe', MyVar, 0);

See also:
ibec_DownloadToVar

back to top of page
<< ibec_DecompressVar | IBEBlock | ibec_url_DownloadToVar >>