Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46980 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93114 invoked from network); 12 Feb 2010 14:02:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2010 14:02:47 -0000 Authentication-Results: pb1.pair.com header.from=dominik@dokdok.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dominik@dokdok.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain dokdok.com from 209.85.212.42 cause and error) X-PHP-List-Original-Sender: dominik@dokdok.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:35639] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/70-23410-58F557B4 for ; Fri, 12 Feb 2010 09:02:46 -0500 Received: by vws1 with SMTP id 1so736076vws.29 for ; Fri, 12 Feb 2010 06:02:43 -0800 (PST) Received: by 10.220.127.89 with SMTP id f25mr922718vcs.125.1265983363232; Fri, 12 Feb 2010 06:02:43 -0800 (PST) Received: from ?172.16.10.132? ([38.108.74.28]) by mx.google.com with ESMTPS id 26sm33238494vws.21.2010.02.12.06.02.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 12 Feb 2010 06:02:42 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1077) In-Reply-To: Date: Fri, 12 Feb 2010 09:02:39 -0500 Content-Transfer-Encoding: quoted-printable Message-ID: <693CEE14-69C4-4D09-82C1-8A221E3A02E4@dokdok.com> References: <20100130232224.GA18033@joeysmith.com> <75DD619F-181F-4299-B812-ADC963C78CE8@dokdok.com> <9862FA74-6B36-4C0E-AA15-6A5E17273C24@dokdok.com> <20100204220251.GA9900@joeysmith.com> To: internals@lists.php.net X-Mailer: Apple Mail (2.1077) Subject: Re: [PHP-DEV] imap4 search criteria From: dominik@dokdok.com (Dominik Gehl) Hi, I was just wondering if there was any interest to get this enhancement = into the PHP IMAP extension. Should I re-sent the patch as an attachment = ? Thanks Dominik On 2010-02-04, at 7:01 PM, Dominik Gehl wrote: >>> $pgm =3D imap_searchprogram_new(); >>> imap_searchprogram_criteria($pgm1,"DRAFT SMALLER 34567 HEADER = Message-Id FROM = dominik@dokdok.com"); >>=20 >> I assume you meant '$pgm' above? >=20 > You are absolutely right ! >=20 > In fact, you can also set every parameter in its own = imap_searchprogram_criteria call, so the above (without the typo) would = be equivalent to the four calls below: >=20 > imap_searchprogram_criteria($pgm,"DRAFT"); > imap_searchprogram_criteria($pgm,"SMALLER 34567"); > imap_searchprogram_criteria($pgm,"HEADER Message-Id = "); > imap_searchprogram_criteria($pgm,"FROM dominik@dokdok.com"); >=20 > If you need a logical OR of several criteria, you would use the = following calls: >=20 > $pgm1 =3D imap_searchprogram_new(); > imap_searchprogram_criteria($pgm1,"DRAFT"); > $pgm2 =3D imap_searchprogram_new(); > imap_searchprogram_criteria($pgm2,"ANSWERED"); > $pgm =3D imap_searchprogram_or($pgm1, $pgm2); > imap_search($mbox,$pgm); >=20 >=20 > Dominik