loading...

Php ZipMaster - Zip files and folders with php

erhankilic profile image Erhan Kılıç ・1 min read

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.

Sample use;

<?php

include 'ZipMaster.php';

$zip = new ZipMaster\ZipMaster('backup/test.zip', 'test_folder');
$zip->archive();

You can reach the project here.

Posted on Oct 27 '17 by:

erhankilic profile

Erhan Kılıç

@erhankilic

I’m Erhan Kılıç, a curious web developer from Turkey who loves to write software applications and websites. I have been working as a web developer since 2013.

Discussion

markdown guide