Re: Re: Sending multipart/form-data request with PECL.
| From: | Manuel Lemos | Date: | Thu, 05 Mar 2009 05:48:04 +0000 |
| Subject: | Re: Re: Sending multipart/form-data request with PECL. | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-289340@lists.php.net to get a copy of this message | ||
Hello,
on 03/05/2009 02:31 AM Jason Cipriani said the following:
> Thanks. I actually had a look at the HttpRequest source code, and I
> can see the logic where it switches to multipart encoding if files are
> present but it actually appears that it's not possible to force it to
> do that. It's sort of annoying that it's right at my finger tips but
> there's no way to do it, and for sort of a silly reason (there's
> arbitrarily no way to pick which encoding to use, it decides for you
> even though it has the capability of doing anything). A custom PECL
> build is not an option, unfortunately.
>
> I'll have to check out the httpclient class that Manuel Lemos mentioned.
Yes, the HTTP client class follows the same logic but has a variable
named force_multipart_form_post that you can set to make it send
multipart form posts as if you were submitting a form with an empty file
input.
--
Regards,
Manuel Lemos
Find and post PHP jobs
http://www.phpclasses.org/jobs/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/