meta data for this page
  •  

ibec_url_DownloadToVar

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

Description

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

Both this and the ibec_url_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.

Syntax

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

Parameters

The Options parameter is reserved for future use.

Example

  Res = ibec_url_DownloadToFile('https://www.ibexpert.com/download/setup.exe',
                                'd:\downloads\ibexpert.exe', '');
  if (Res) then
    ibec_ShowMessage('Downloaded successfully');

  MyVar = null;
  Res = ibec_url_DownloadToVar ('https://www.ibexpert.com/download/setup.exe',
                           MyVar, '');
  if (Res) then
    ibec_SaveToFile('d:\downloads\ibexpert.exe', MyVar, 0);