downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.gzgetss.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.zlib.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.gzgetss.php',
   
1 => 'gzgetss',
  ),
 
'up' =>
  array (
   
0 => 'ref.zlib.php',
   
1 => 'Zlib Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.gzgets.php',
   
1 => 'gzgets',
  ),
 
'next' =>
  array (
   
0 => 'function.gzinflate.php',
   
1 => 'gzinflate',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.gzgetss" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gzgetss</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">gzgetss</span> &mdash; <span class="dc-title">
   Get line from gz-file pointer and strip HTML tags
  </span></p>

 </div>
 <a name="function.gzgetss.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><b>gzgetss</b></span>
    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$zp</tt></span>
   , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$length</tt></span>
   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$allowable_tags</tt></span>
  ] )</div>

  <p class="para rdfs-comment">
   Identical to <a href="function.gzgets.php" class="function">gzgets()</a>, except that
   <b>gzgetss()</b> attempts to strip any HTML and PHP
   tags from the text it reads.
  </p>
 </div>

 <a name="function.gzgetss.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">zp</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The gz-file pointer. It must be valid, and must point to a file
       successfully opened by <a href="function.gzopen.php" class="function">gzopen()</a>.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">length</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The length of data to get.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">allowable_tags</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       You can use this optional parameter to specify tags which should not
       be stripped.
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>

 <a name="function.gzgetss.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   The uncompressed and striped string, or <b><tt class="constant">FALSE</tt></b> on error.
  </p>
 </div>

 <a name="function.gzgetss.changelog"></a><div class="refsect1 changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   </p><table class="doctable informaltable">
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left">4.0.0</td>
       <td align="left">
        <i><tt class="parameter">allowable_tags</tt></i>
 was added.
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
 </div>

 <a name="function.gzgetss.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <b>gzgetss()</b> example</b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$handle&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">gzopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'somefile.gz'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'r'</span><span style="color: #007700">);<br />while&nbsp;(!</span><span style="color: #0000BB">gzeof</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$buffer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">gzgetss</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4096</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$buffer</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">gzclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div><p>
  </p>
 </div>

 <a name="function.gzgetss.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.gzopen.php" class="function" rel="rdfs-seeAlso">gzopen()</a> - Open gz-file</li>
    <li class="member"><a href="function.gzgets.php" class="function" rel="rdfs-seeAlso">gzgets()</a> - Get line from file pointer</li>
    <li class="member"><a href="function.strip-tags.php" class="function" rel="rdfs-seeAlso">strip_tags()</a> - Strip HTML and PHP tags from a string</li>
   </ul><p>
  </p>
 </div>

</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites