Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gzopen(3) [php man page]

GZOPEN(3)								 1								 GZOPEN(3)

gzopen - Open gz-file

SYNOPSIS
resource gzopen (string $filename, string $mode, [int $use_include_path]) DESCRIPTION
Opens a gzip (.gz) file for reading or writing. gzopen(3) can be used to read a file which is not in gzip format; in this case gzread(3) will directly read from the file without decom- pression. PARAMETERS
o $filename - The file name. o $mode - As in fopen(3) ( rb or wb) but can also include a compression level ( wb9) or a strategy: f for filtered data as in wb6f, h for Huffman only compression as in wb1h. (See the description of deflateInit2 in zlib.h for more information about the strategy param- eter.) o $use_include_path - You can set this optional parameter to 1, if you want to search for the file in the include_path too. RETURN VALUES
Returns a file pointer to the file opened, after that, everything you read from this file descriptor will be transparently decompressed and what you write gets compressed. If the open fails, the function returns FALSE. EXAMPLES
Example #1 gzopen(3) Example <?php $fp = gzopen("/tmp/file.gz", "r"); ?> SEE ALSO
gzclose(3). PHP Documentation Group GZOPEN(3)

Check Out this Related Man Page

GZGETSS(3)								 1								GZGETSS(3)

gzgetss - Get line from gz-file pointer and strip HTML tags

SYNOPSIS
string gzgetss (resource $zp, int $length, [string $allowable_tags]) DESCRIPTION
Identical to gzgets(3), except that gzgetss(3) attempts to strip any HTML and PHP tags from the text it reads. PARAMETERS
o $zp - The gz-file pointer. It must be valid, and must point to a file successfully opened by gzopen(3). o $length - The length of data to get. o $allowable_tags - You can use this optional parameter to specify tags which should not be stripped. RETURN VALUES
The uncompressed and stripped string, or FALSE on error. EXAMPLES
Example #1 gzgetss(3) example <?php $handle = gzopen('somefile.gz', 'r'); while (!gzeof($handle)) { $buffer = gzgetss($handle, 4096); echo $buffer; } gzclose($handle); ?> SEE ALSO
gzopen(3), gzgets(3), strip_tags(3). PHP Documentation Group GZGETSS(3)
Man Page