note 45706 modified in function.imap-get-quotaroot by felipe
| From: | felipe@php.net | Date: | Wed, 28 May 2008 12:16:51 +0000 |
| Subject: | note 45706 modified in function.imap-get-quotaroot by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-139914@lists.php.net to get a copy of this message | ||
The example above isn't right. Replace with this:
<?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['STORAGE'];
echo "STORAGE usage level is: " . $storage['usage'];
echo "STORAGE limit level is: " . $storage['limit'];
$message = $quota['MESSAGE'];
echo "MESSAGE usage level is: " . $message['usage'];
echo "MESSAGE usage level is: " . $message['limit'];
/* ... */
}
imap_close($mbox);
?>
--was--
The example above isn´t right. Replace with this:
<?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['STORAGE'];
echo "STORAGE usage level is: " . $storage['usage'];
echo "STORAGE limit level is: " . $storage['limit'];
$message = $quota['MESSAGE'];
echo "MESSAGE usage level is: " . $message['usage'];
echo "MESSAGE usage level is: " . $message['limit'];
/* ... */
}
imap_close($mbox);
?>
http://php.net/manual/en/function.imap-get-quotaroot.php