Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64473 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76863 invoked from network); 2 Jan 2013 15:39:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2013 15:39:52 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:63465] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/F5-12868-7C454E05 for ; Wed, 02 Jan 2013 10:39:52 -0500 Received: from transformer.fritz.box (host-188-174-197-246.customer.m-online.net [188.174.197.246]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 5CE2E65FC6; Wed, 2 Jan 2013 16:39:48 +0100 (CET) User-Agent: K-9 Mail for Android In-Reply-To: <50E3DEA8.3090509@sugarcrm.com> References: <4F5C5540.8010204@sugarcrm.com> <4F5D3569.8050307@sugarcrm.com> <50DE4A01.8050006@sugarcrm.com> <50E3DEA8.3090509@sugarcrm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Wed, 02 Jan 2013 16:39:51 +0100 To: Stas Malyshev ,Pierrick Charron CC: Internals Message-ID: Subject: Re: [PHP-DEV] CURL file posting From: johannes@schlueters.de (=?ISO-8859-1?Q?Johannes_Schl=FCter?=) Stas Malyshev wrote: >Hi! > >I'm thinking maybe the best solution is to have a new class - say, >CurlFile - and do this: > >$file = new CurlFile("myface.png", "image/png"); >curl_setopt($ch, CURLOPT_POSTFIELDS, array("foo" => "bar", "picture" => >$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