Thursday, June 19, 2014

Monday, June 9, 2014

How to upload files on another FTP in PHP

First of all make the connection with ftp host and then login to ftp with username and password.
then If you are logged in the put the files on the ftp with ftp_put function.

$connection = ftp_connect(FTP_HOST );
$login = ftp_login( $connection, FTP_USERNAME, FTP_PASSWORD);
if ($connection AND $login ) {

ftp_put($connection, "REMOTE_FTP", "LOCAL_FILE_PATH", FTP_BINARY);
ftp_close($connection);
}

Need any help contact me.