This function connects to the FTP server.
Parameters
Name | Explanation |
---|---|
ServerName | The name of the FTP server or IPAddress (*1) |
UserName | The username needed to access the FTP server |
Password | The password needed to access the FTP server |
hOpen | The FTP server open handle |
hConnect | The FTP server session handle |
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
The IKFTPConnect function connects to the FTP server. This function can only be executed from the client computer. It does not operate on the server. This function is used in conjunction with IKFTPDeleteFileEx, IKFTPGetFileEx, IKFTPPutFileEx, and IKFTPRenameFileEx functions.
(*1)
When setting a proxy server or changing the mode connection (PASV) or changing the port number, use the ServerName parameter to pass the necessary information. The information is passed in this parameter in the following order: FTP Server name or IPAddress;Proxy Server IPAddress;Port Number;Passive Mode True/False. (use a semicolon to delimit multiple entries).
Note: If you do not specify the port number the default port number will be used. If you do not specify passive or active mode then passive mode will be used.
- A. Set a proxy server:
- ServerName = "www.newtone.co.jp;xxx.xxx.x.xxx"
- B. Change the port number to 22:
- ServerName = "www.newtone.co.jp;;22"
- C. Use active mode instead of passive mode:
- ServerName = "www.newtone.co.jp;;;FALSE"
- D. Set a proxy server and change the port number to 22:
- ServerName = "www.newtone.co.jp;xxx.xxx.x.xxx;22"
- E. Set a proxy server, change the port number to 22 and set the connection mode to active:
- ServerName = "www.newtone.co.jp;xxx.xxx.x.xxx;22;FALSE"