Navigation

Search

ftp_connection

Description

Constructor for the ftp_connection class.

Syntax

void ftp_connection (string $ftp_server[, int $ftp_port[, string $ftp_user[, string $ftp_password]]])



Parameter $ftp_server

Expected type: String
Description: The server to connect to



Parameter $ftp_port

Expected type: Integer
Description: Which port to connect to. Default is 21 (standard FTP port)



Parameter $ftp_user

Expected type: String
Description: The username to connect with. Default is 'anonymous'



Parameter $ftp_password

Expected type: String
Description: The password for this username. Default is 'ftpclient@simplemachines.org' (anonymous FTP usually requires your email address as the password)


Notes

  • Sends information off to the connection function
  • Example: $package_ftp = new ftp_connection('localhost', 21, 'username', 'password');
View all versions of this function