Hello to everyone. This is my first article. If there are any mistakes, please do not look up.
Compressing files in PHP and creating a zip file is easy, but the situation changes when you include folders into the job. You may want to automatically back up the files on your server like me and you may want to have a solution for it. I have a vps with a lot of sites and I want these sites to be automatically backed up. My solution is to write a script in PHP creates a cronjob.
It is simple to use and you can use it as you like. Please do not hesitate if you want to improve.
$zip = new ZipMaster\ZipMaster('backup/test.zip', 'test_folder');
You can reach the project here.