Adds a mirror source to the DwinsHs_MirrorsList mirror sources list for a remote file. If a remote file need to be downloaded and the server which specified in the DwinsHs_AppendRemoteFile procedure or DwinsHs_Check function doesn't work, the mirror source will be used to download it.
You can add mirror source for all of remote files which added using DwinsHs_AppendRemoteFile procedure or DwinsHs_Check function. Also, you can add multiple mirror sources for a remote file.
type
TReadMethod = (rmGet, rmPost, rmActive, rmPassive);
procedure DwinsHs_AppendMirrorFile(Filename: string; URL, Agent: AnsiString;
Method: TReadMethod);
Specifies the path and name of the local file the remote file will be saved as.
Specifies the full address of mirror file, or specifies the address of server script. the "http", "https" and "ftp" schemes are supported. Optional username, password and port number can be included. For "http" and "https" schemes, an optional parameters string can be included too.
Format:
[<scheme>://][<username>[:<password>]@]<host>[:<port>][/<path>][?<parameters>]
For example:
http://username:[email protected]:8080/images/file.jpg
https://www.mywebsite.com/license/verify.php?license_key=xxx-xxx-xxx-xxx&license_type=2
ftp://username:[email protected]:2121/images/file.jpg
Specifies the user agent string. Your server can use the string to determine whether the request is sent by your installation package, or determine which installation package sends the request, etc.
Specifies the HTTP methods for an "http" or "https" request. Or the transfer mode for an "ftp" request. It can be one of the following values:
The procedure is avaliable only when the DwinsHs_Use_Predefined_Downloading_WizardPage marco is defined.
Copyright © 2001-2022, Han-soft Corporation. All rights reserved.