This method retrieves a file from the HTTP server. (It includes connecting to and disconnecting from the server.)

[C++Builder]   [ bool = ]imagekitcontrolname->FileIO->HTTPGetFile(const UnicodeString ServerName, const UnicodeString ProxyName, short PortNo, bool PassiveMode, const UnicodeString RemoteFilePath, const UnicodeString UserName, const UnicodeString Password, int TransPercent)
[Delphi]   [ Boolean = ]imagekitcontrolname.FileIO.HTTPGetFile(const ServerName: string; const ProxyName: string; PortNo: Smallint; PassiveMode: Boolean; const RemoteFilePath: string; const UserName: string; const Password: string; TransPercent: Integer)

Parameters

Name Explanation
ServerName The name of the HTTP server or IPAddress
ProxyName The Proxy Server IP Address
PortNo Port Number (default is 80)
RemoteFilePath The name and path of the file to be retrieved
UserName The username needed to access the HTTP server
Password The password needed to access the HTTP server
TransPercent The percentage of the file that is tranferred before the ImageKit Progress event is generated

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The HTTPGetFile method retrieves a file from the HTTP server. (It includes connecting to and disconnecting from the server.) This method can only be executed from the client computer. It does not operate on the server. The TransPercent parameter sets the amount of transfer in percentage before the ImageKit Progress event fires. For example, if the TransPercent = 10, the ImageKit Progress event will fire 10 times, 1 time for each 10% of file transferred.

The retrieved file is saved in the location specified by the FileName property.

When not using a proxy server set the ProxyName to an empty string.

If using a HTTP server, use the HTTPGetFile method. If using a HTTPS server, use the HTTPSGetFile method.

 

The ImageKit10 VCL is a product created by Newtone Corporation