Re: CURL file posting

From: Date: Wed, 02 Jan 2013 16:16:40 +0000
Subject: Re: CURL file posting
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-64477@lists.php.net to get a copy of this message
On Wed, Jan 2, 2013 at 4:39 PM, Johannes Schlüter <johannes@schlueters..de>wrote: > > > Stas Malyshev <smalyshev@sugarcrm.com> 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 > > 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 -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.internals (#64477) next »