<?php $handle = gzopen('somefile.gz', 'r'); while (!gzeof($handle)) { $buffer = gzgetss($handle, 4096); echo $buffer; }gzclose($handle);?>