Categories

create a gzip file

this example backs up the index.php as a gzip file

<?php
$data = implode(“”, file(“index.php”));
$gzdata = gzencode($data, 9);
$fp = fopen(“index.php.gz”, “w”);
fwrite($fp, $gzdata);
fclose($fp);
?>