title: Use PHP to connect to FTP and backup all folder contents
body: <p>I'm building a custom web app that stores the FTP and MySQL settings for the websites I manage for clients. My goal is not only to store the settings for reference, but to create functionality to assist in doing regular backups.</p>
  
  <p>I've got the MySQL backup functionality working great, as it connects to the remote databases, creates a dump and sends it to my browser to download locally.</p>
  
  <p>BUT... what is the best way to connect to a remote FTP and download all the contents of a specific folder to my local computer?</p>
  
  <p>Any suggestions would be amazing!</p>