/ Published in: PHP

I wrote this code for when I need to get files from other servers and put them on my own server. I wanted to simplify it as much as possible.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function ftp_download($ftp_host, $ftp_user, $ftp_pass, $remote_file_path, $local_file_path, $passive = true, $mode = FTP_BINARY) { if ($conn_id) { return true; } else { return false; } } else { throw new Exception("Failed to login to the FTP server.", 100) } } else { throw new Exception("Failed to connect to the FTP server.", 99); } }
Comments
