Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 1134

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>imap_get_quotaroot</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="IMAP, POP3 and NNTP functions"
HREF="ref.imap.html"><LINK
REL="PREVIOUS"
TITLE="imap_get_quota"
HREF="function.imap-get-quota.html"><LINK
REL="NEXT"
TITLE="imap_getmailboxes"
HREF="function.imap-getmailboxes.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.imap-get-quota.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.imap-getmailboxes.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.imap-get-quotaroot"
></A
>imap_get_quotaroot</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN38138"
></A
><P
>    (PHP 4 &#62;= 4.3.0)</P
>imap_get_quotaroot&nbsp;--&nbsp;
     Retrieve the quota settings per user
    </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN38141"
></A
><H2
>Description</H2
>array <B
CLASS="methodname"
>imap_get_quotaroot</B
> ( resource imap_stream, string quota_root)<BR
></BR
><P
>&#13;     Returns an array of integer values pertaining to the specified user 
     mailbox.  All values contain a key based upon the resource name, and a
     corresponding array with the usage and limit values within.  
    </P
><P
>&#13;     The limit value represents the total amount of space
     allowed for this user's total mailbox usage.  The usage value represents 
     the user's current total mailbox capacity.  This function will return 
     <TT
CLASS="constant"
><B
>FALSE</B
></TT
> in the case of call failure, and an array of information about 
     the connection upon an un-parsable response from the server.
    </P
><P
>&#13;     This function is currently only available to users of the c-client2000
     or greater library.
    </P
><P
>&#13;     <TT
CLASS="parameter"
><I
>imap_stream</I
></TT
> should be the value returned from
     an <A
HREF="function.imap-open.html"
><B
CLASS="function"
>imap_open()</B
></A
> call.  This stream should be opened 
     as the user whose mailbox you wish to check.
     <TT
CLASS="parameter"
><I
>quota_root</I
></TT
> should normally be in the form of
     which mailbox (i.e. INBOX).
    </P
><P
>&#13;     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN38161"
></A
><P
><B
>Example 1. <B
CLASS="function"
>imap_get_quotaroot()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>$mbox = imap_open("{your.imap.host}","kalowsky","password",OP_HALFOPEN)
      or die("can't connect: ".imap_last_error());
 
$quota = imap_get_quotaroot($mbox, "INBOX");
if(is_array($quota)) {
   $storage = $quota_values['STORAGE'];
   print "STORAGE usage level is: " .  $storage['usage'];
   print "STORAGE limit level is: " .  $storage['limit'];

   $message = $quota_values['MESSAGE']; 
   print "MESSAGE usage level is: " .  $message['usage'];
   print "MESSAGE usage level is: " .  $message['limit'];

   /* ...  */ 

} 
 
imap_close($mbox);</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
    </P
><P
>&#13;     See also <A
HREF="function.imap-open.html"
><B
CLASS="function"
>imap_open()</B
></A
>, <A
HREF="function.imap-set-quota.html"
><B
CLASS="function"
>imap_set_quota()</B
></A
>, <A
HREF="function.imap-get-quota.html"
><B
CLASS="function"
>imap_get_quota()</B
></A
>.
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.imap-get-quota.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.imap-getmailboxes.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>imap_get_quota</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.imap.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>imap_getmailboxes</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>