<?php
if(!function_exists('file2zip'))
{
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Compress a file
#
function file2zip($path, $file, $contents)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{
$zp=gzopen($path.$file.'.gz','w9');
if($zp==true)
{
gzwrite($zp,$contents);
gzclose($zp);
return(true);
}
else { return; }
}
}
?>