This is an old revision of the document!
WM-MINI2, WM-MEGA FW >= 2.1137 WM-M2 FW >= 3.1137
Open a connection to an FTP server
Connect to the server and return the response code.
$host: String containing the host name or IP address of teh FTP server
$port: Int FTP port number
$username: String containing the FTP username
$password: String containing the FTP password
$secure: Int whether to use TLS (1) or not (0)
int: Returns 1 if FTP connection was successful and 0 if it failed.
<? $res = ftp_open("ftp.myserver.com",21,"myuser","mypassword"); if ($res) { print("connected to FTP server!!"); ftp_close(); } ?>
ftp_close() - Close an FTP connection