Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64477 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90792 invoked from network); 2 Jan 2013 16:16:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2013 16:16:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.174 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.223.174 mail-ie0-f174.google.com Received: from [209.85.223.174] ([209.85.223.174:36466] helo=mail-ie0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/F8-12868-B6D54E05 for ; Wed, 02 Jan 2013 11:16:43 -0500 Received: by mail-ie0-f174.google.com with SMTP id c11so16693192ieb.5 for ; Wed, 02 Jan 2013 08:16:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hbDkMHnBP42dMbUMs2ELo6B3Vznn6Hx06W+/LS18OEw=; b=zQKF8+RDHFrehKh/9jfnBlkBABzjciM+Uro/0sBjb1UuL3OSp0kBhHdS38lAWOvg4d 0U5oRGpZvkMYNZbm4JsTwKA53pr7EYKw97+BhrXtB4o++AHGNtYd82h1uifJJiFLrYLn h5KyrMidIqMBH++YcsHpM+XbJVZCIAb7F6mY2a42YBndv6ZHonJ2kA0pIm/0Hz4eZlVK sbXA7M0Vpcke9YuJmx3zC6YILkCgOV+WH47H7Ru/SshZ2swpMw2UUAj2PwNlDnb1pE7p UQjPnVbayDiHYwpONqTjvVvlZ+lFA1hQAhLQQ1vNAcQbPjuBfAQfyNUTigZOWs0mGSAh xpew== MIME-Version: 1.0 Received: by 10.50.196.130 with SMTP id im2mr9553356igc.17.1357143400418; Wed, 02 Jan 2013 08:16:40 -0800 (PST) Received: by 10.50.106.138 with HTTP; Wed, 2 Jan 2013 08:16:40 -0800 (PST) In-Reply-To: References: <4F5C5540.8010204@sugarcrm.com> <4F5D3569.8050307@sugarcrm.com> <50DE4A01.8050006@sugarcrm.com> <50E3DEA8.3090509@sugarcrm.com> Date: Wed, 2 Jan 2013 17:16:40 +0100 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: Stas Malyshev , Pierrick Charron , Internals Content-Type: multipart/alternative; boundary=14dae93410714a8c4c04d25092cf Subject: Re: [PHP-DEV] CURL file posting From: tyra3l@gmail.com (Ferenc Kovacs) --14dae93410714a8c4c04d25092cf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jan 2, 2013 at 4:39 PM, Johannes Schl=C3=BCter wrote: > > > Stas Malyshev wrote: > > >Hi! > > > >I'm thinking maybe the best solution is to have a new class - say, > >CurlFile - and do this: > > > >$file =3D new CurlFile("myface.png", "image/png"); > >curl_setopt($ch, CURLOPT_POSTFIELDS, array("foo" =3D> "bar", "picture" = =3D> > >$file); > > What I wonder about in this thread: If we struggle here why not take the > full step and abstract curl details comletely away and provide something > like pecl/http by default instead? > > johannes > > I think that a more compact and easier-to-use API would be nice, but only if we don't limit the current functionality. So that should either provide everything that we have currently or only add this as a separate interface, but keep the old one also. my 2 cents --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --14dae93410714a8c4c04d25092cf--