FTPS upload a file from Ruby using Curl command line
`curl -k --ftp-ssl -3 -T#{path} -u#{FTP_USER}:#{FTP_PASS} #{FTP_HOST}`
-k forces the connection even if the cert looks bad
-3 turns on SSLv3
-T file to upload
-u user:password
11391 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
`curl -k --ftp-ssl -3 -T#{path} -u#{FTP_USER}:#{FTP_PASS} #{FTP_HOST}`
$conn_id = ftp_connect("www.yoursite.com"); $login_result = ftp_login($conn_id, "username", "password"); if ((!$conn_id) || (!$login_result)) { echo "FTP connection has failed!"; exit; } else { echo "Connected"; } // get the file $local = fopen("local.txt","w"); $result = ftp_fget($conn_id, $local,"httpdocs/trlog.txt", FTP_BINARY); // check upload status if (!$result) { echo "FTP download has failed!"; } else { echo "Downloaded "; } // close the FTP stream ftp_close($conn_id);
ncftpget -u <username> -p <password> -R ftp://ftp.microsoft.com/Files/
mount --rbind /mnt/pub /home/pub
import ftplib s = ftplib.FTP('myserver.com','login','password') # Connect f = open('todo.txt','rb') # file to send s.storbinary('STOR todo.txt', f) # Send the file f.close() # Close file and FTP s.quit()