meta data for this page
  •  

ibec_url_DownloadToFile

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

Description

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

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

Syntax

  function ibec_url_DownloadToFile(URL : string; FileName : string; 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_DownloadToVar('https://www.ibexpert.com/download/setup.exe',
                           MyVar, '');
  if (Res) then
    ibec_SaveToFile('d:\downloads\ibexpert.exe', MyVar, 0);