Click here to Skip to main content
15,936,876 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys;
I've been trying to come up with a way to build an automated PHP transfer system between 2 servers.

Server A : only ftp access; server B : ftp access and can run php scripts.

I want to copy all file in server A to a folder in server B;

Here is what I am trying to do :

1: function compress_each_ftp_folder_or_file_in_ftp_Backups_folder();

2: function delete each_ftp_folder_in_ftp_Backups_folder_after_successful_zipping();

3: function download_each_archive_in_ftp_Backups_folder();

4: function delete_each_archive_after_successful_download();

I have written some scripts for step 2, 3 and 4 but nothing found on web that help me with step 1;
I found lot of codes to compress folders or files on local server, but I don't found any script that compress a whole folder on a remote ftp server.

I think it was the time to ask for a help. Thanks for helping me.

1 solution

you could use ZipArchive class
please see its doc on php manual
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900