Hello, on 03/04/2009 03:33 PM Jason Cipriani said the following: > I am trying to submit a request to an HTTP server with > multipart/form-data encoded data. I'm using PECL's HttpRequest > (although I'm open to alternatives). I am using PHP5. > > I noticed that if you call addPostFile to add a file, PECL will send > the file, and all other post parameters, with multipart/form-data > encoding, so I know PECL has the capability to do it. If you simply > call addPostFields but never call addPostFile, it uses standard post > encoding. > > Is there a way to force PECL to use multipart/form-data encoding for > all post fields added with addPostFields, even when you are not > calling addPostFile to add a file? > > If not, is there another good way to encode multipart data with PHP?
I have no idea because I do not use PECL extensions. I use this HTTP client class for emulating browser form submission. Take a look at the test_http_post.php that has examples of how to upload forms using POST requests: http://www.phpclasses.org/httpclient -- 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/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php