ftp put : FTP Functions « Network « PHP






ftp put

 
<?php

$conn = ftp_connect("ftp.somedomain.com");
if ($conn) {
  $session = ftp_login($conn, "user", "pass");
  if ($session) {
    if (ftp_chdir($conn, "somedir")) {
      ftp_put($conn, "remote.txt", "local.txt", FTP_ASCII);
    }
  }
  ftp_close($conn);
}
?>
  
  








Related examples in the same category

1.FTP Functions
2.Write to file with ftp functions
3.Write to remote file on a ftp server
4.Saving a remote file via FTP with file_put_contents()
5.Using a password with FTP or HTTP
6.use the ftp_* functions to upload a single file to an FTP server.