GZGETSS(3) 1 GZGETSS(3)gzgetss - Get line from gz-file pointer and strip HTML tagsSYNOPSIS
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)
Check Out this Related Man Page
GZREAD(3) 1 GZREAD(3)gzread - Binary-safe gz-file readSYNOPSIS
string gzread (resource $zp, int $length)
DESCRIPTION gzread(3) reads up to $length bytes from the given gz-file pointer. Reading stops when $length (uncompressed) bytes have been read or EOF
is reached, whichever comes first.
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 number of bytes to read.
RETURN VALUES
The data that have been read.
EXAMPLES
Example #1
gzread(3) example
<?php
// get contents of a gz-file into a string
$filename = "/usr/local/something.txt.gz";
$zd = gzopen($filename, "r");
$contents = gzread($zd, 10000);
gzclose($zd);
?>
SEE ALSO gzwrite(3), gzopen(3), gzgets(3), gzgetss(3), gzfile(3), gzpassthru(3).
PHP Documentation Group GZREAD(3)
Hi,
I am trying to strip html tags of a string for example
<TD>no problem</TD>
the sesult should be
no problem
but could never get rid off all the tags
sed 's/<..D>//g'
Please help, I am new (3 Replies)
Hello,
I am checking the length of each line of a fixed length file and making sure all lines are 161 length. My problem is that some files contain null characters which gets stripped out of my echo. How do I have the NULLs included in my check? (and I cannot replace or sub the NULL values with... (10 Replies)
I have umpteen number of files containing HTML A tags in the below format
or
I want to find all the lines that contain the word Login=
I used this command
grep "Login=" *
This gave me normal lines as well which contain the word Login= for example, it returned lines which... (2 Replies)
Hello,
I have two files in this form that consist of three columns, a name (L*contig*), the length (length=**) and the sequence
LT_file.txt
LTcontig1 length=13 acccatgctttta
LTcontig5 length=8 ggattacc
LTcontig8 length=20 ccattgaccgtacctgatcg
LTcontig23 length=5 accta
and... (5 Replies)
hey 1 more question, how do you strip tags like <p></p> from output of xml with perl?
i already strip the CDATA but the annoying <p></p> still there (2 Replies)