<< ibec_url_DownloadToFile | IBEBlock | ibec_Exec >>

ibec_url_DownloadToVar

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

Syntax

 function ibec_url_DownloadToVar(URL : string; var V : variant; Options : variant) : Boolean;

Description

The ibec_url_DownloadToVar function saves downloaded data in a local variable file specified by V parameter.

Both this and the ibec_DownloadToFile function try to download the data from 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_DownloadToFile

back to top of page
<< ibec_url_DownloadToFile | IBEBlock | ibec_Exec >>