GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Twelve — Internet Functions (continued)
Overview
The FTPOpenConnection function opens a connection to remote FTP server and returns an FTP Object.
Syntax/Parameters
Syntax
handle = FTPOpenConnection ( string server, [string username], [string password],
[int
port], [boolean passive] );
Parameters
server
A string containing the host name or IP address of the FTP server. The string should be the domain name only, do not proceed the string with ‘ftp:’ or any other information. Alternately, the string can contain the IP number of the site, in ASCII dotted-decimal format (for example, 11.0.1.45).
username
An optional string specifying the user name. If the username is omitted, the default value is “anonymous”.
password
An optional string specifying the user password. (Note that FTP sends information in clear text.)
port
An integer specifying an optional initial port, defaults to 21. Note that the FTP service will open additional ports. If the value is less than 1, it will default to 21. The username and password must be provided to use this parameter.
passive
A boolean when set to TRUE (1) sets the FTP connection to run in passive mode. The port must be set to use this option. The host server must support passive mode to use this option.
Return Value
A handle to an FTP Connection Object or NULL_HANDLE (0) on error. Use the GetLastError and GetLastErrorMessage functions to retrieve additional details.
Remarks
Legato FTP function employs the Windows WinINET internet connection functionality and must work within the limitations (and problems) of WinINET. If a script experiences temperamental connections, the script may need to close and reopen the connection.
If difficulties and delays occur in using FTP functions, consider setting the passive option. By default, the FTP connection is in active mode where the server (host) can establish connections back to the client. While port 21 is the default port for FTP, once a connection has been established FTP functions support opening multiple additional ports. Many firewalls either may not allow or support such port forwarding requests from an external source. In passive mode, the client establishes all port connections and reduces the burden on firewalls and proxies to deal with the FTP connections. However, the host must support and respond to the PASV (passive) command for this option to operate correctly.
Proper security precautions should be employed when storing and using passwords. This function abides by the Secure Memory Model.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.