ElFenix Posted January 18, 2008 Share Posted January 18, 2008 I am trying to have my site copy a zip file from an ftp site to the server, but whenever it gets to the server it is always corrupted. Has anyone else come across this? How could I fix it? $local_file = 'local.zip'; $remote_file = 'remote.zip'; $handle = fopen($local_file, 'w+'); $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); ftp_fget($conn_id, $handle, $remote_file, FTP_ASCII, 0); ftp_close($conn_id); fclose($handle); Quote Link to comment https://forums.phpfreaks.com/topic/86700-copying-zip-over-ftp/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.