Building a basket is simple, and described on this very site, in the articles.
The problems start with the FTP server.
You are on a different server, so any file you want to send would have to be downloaded from the FTP server by your webserver before they can be zipped. Bad.
If you have a local copy of the files on your webserver, you could simply issue a ZIP command through exec etc, to get the files into one big file to send it.
A workaround could be a simple "zipserver" on the ftp server, that you can talk to to zip files.
Your webserver could ask the zipserver to zip a number of files into a file with a new name, and you could then offer that name to the client to download.