FTP functions FTP FTP stands for File Transfer Protocol. The following constants are defined when using the FTP module: FTP_ASCII, and FTP_BINARY. ftp_connect Opens up an FTP connection Description int ftp_connect string host Returns a FTP stream on success, false on error. ftp_connect opens up a FTP connection to the specified host. ftp_login Logs in a FTP connection Description int ftp_login int ftp_stream string username string password Returns true on success, false on error. Logs in the given FTP stream. ftp_chdir Changes directories on a FTP server Description int ftp_chdir int ftp_stream string directory Returns true on success, false on error. Changes to the specified directory. ftp_nlist Returns a list of files in the given directory. Description int ftp_nlist int ftp_stream string directory Returns an array of filenames on success, false on error. ftp_get Downloads a file from the FTP server. Description int ftp_get int ftp_stream string local_file string remote_file int mode Returns true on success, false on error. ftp_get retrieves remote_file from the FTP server, and saves it to local_file locally. The transfer mode specified must be either FTP_ASCII or FTP_BINARY. ftp_put Uploads a file to the FTP server. Description int ftp_put int ftp_stream string remote_file string local_file int mode Returns true on success, false on error. ftp_put stores local_file on the FTP server, as remote_file. The transfer mode specified must be either FTP_ASCII or FTP_BINARY. ftp_quit Closes an FTP connection Description int ftp_quit int ftp_stream ftp_connect closes ftp_stream.