Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 3746

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Check current mailbox</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imap-bodystruct.html">imap_bodystruct</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imap-clearflag-full.html">imap_clearflag_full</a></div>
 <div class="up"><a href="ref.imap.html">IMAP Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.imap-check" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imap_check</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">imap_check</span> &mdash; <span class="dc-title">Check current mailbox</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imap-check-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">object</span> <span class="methodname"><strong>imap_check</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$imap_stream</code></span>
   )</div>

  <p class="para rdfs-comment">
   Checks information about the current mailbox.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imap-check-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>
<span class="term"><em><code class="parameter">
imap_stream</code></em></span><dd>
<p class="para">An IMAP stream returned by
 <span class="function"><a href="function.imap-open.html" class="function">imap_open()</a></span>.</p></dd>
</dt>

   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imap-check-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the information in an object with following properties:
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      <strong><code>Date</code></strong> - current system time formatted according to <a href="http://www.faqs.org/rfcs/rfc2822" class="link external">&raquo;&nbsp;RFC2822</a>
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <strong><code>Driver</code></strong> - protocol used to access this mailbox:
      <acronym title="Post Office Protocol version 3">POP3</acronym>, <acronym title="Internet Message Access Protocol">IMAP</acronym>, <acronym title="Network News Transfer Protocol">NNTP</acronym>
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <strong><code>Mailbox</code></strong> - the mailbox name
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <strong><code>Nmsgs</code></strong> - number of messages in the mailbox
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <strong><code>Recent</code></strong> - number of recent messages in the mailbox
     </span>
    </li>
   </ul>
  </p>
  <p class="para">
   Returns <strong><code>FALSE</code></strong> on failure.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.imap-check-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-3353">
    <p><strong>Example #1  <span class="function"><strong>imap_check()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$imap_obj&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imap_check</span><span style="color: #007700">(</span><span style="color: #0000BB">$imap_stream</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$imap_obj</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>The above example will output
something similar to:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
object(stdClass)(5) {
  [&quot;Date&quot;]=&gt;
  string(37) &quot;Wed, 10 Dec 2003 17:56:54 +0100 (CET)&quot;
  [&quot;Driver&quot;]=&gt;
  string(4) &quot;imap&quot;
  [&quot;Mailbox&quot;]=&gt;
  string(54)
  &quot;{www.example.com:143/imap/user=&quot;foo@example.com&quot;}INBOX&quot;
  [&quot;Nmsgs&quot;]=&gt;
  int(1)
  [&quot;Recent&quot;]=&gt;
  int(0)
}
</pre></div>
    </div>
   </div>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imap-bodystruct.html">imap_bodystruct</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imap-clearflag-full.html">imap_clearflag_full</a></div>
 <div class="up"><a href="ref.imap.html">IMAP Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>