note 8934 added to imap_sort
| From: | ks at edv dot chek dot com | Date: | Fri, 06 Oct 2000 19:18:47 +0000 |
| Subject: | note 8934 added to imap_sort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6182@lists.php.net to get a copy of this message | ||
just finished:
include('imappop3.php');
$mbox=imap_open($mailbox,$username,$password) or die('keine Verbindung!');
//sortiert reverse nach Größe und liefert UIDs
$sorted_array=imap_sort($mbox,SORTSIZE,1,SE_UID);
$mail=imap_fetchstructure($mbox,next($sorted_array),FT_UID);
echo $mail->bytes.'<br>';
$mail=imap_fetchstructure($mbox,end($sorted_array),FT_UID);
echo $mail->bytes.'<br>';
if ($err=imap_errors()) print_r($err);
imap_close ($mbox);
outputs the size of the biggest and smallest EMail:
36476
526
http://www.php.net/manual/function.imap-sort.php