Re: SV: [PHP] Sending files via POST
Anders Norrbring wrote: >> On Fri, Jan 2, 2009 at 14:14, Anders Norrbring >> wrote: >>> *bump* >> Please don't "bump" threads, Anders. This is not a traditional >> web-based user forum. You've provided no additional data, so there is >> no need to bring this thread up again. If you want to get more >> attention to it, you will need to send a reply to the list with >> updated information. The last response in this thread was from Nathan >> Rixham. If you didn't receive that message, you can find it in the >> archives, or I'll be glad to forward it to you. If it didn't solve >> your problem, you can say so and folks here will be happy to help you >> further. > > > I provided some additional data at 2009-01-01 09:33.. (That would be GMT+1 > hour) > But after that.. I didn't get *anything* at all, not from Nathan, not from > anybody else. > > And I'm fully aware of the distinctions between a mailing list and a web > based forum. After all, I've been in this business (computers and > communications) since 1979 (Yeah, I'm that old...). But I didn't get any > replies whatsoever, neither in private nor in the list, therefore I felt an > urge to do something to draw some attention to this matter. > > And yes Daniel, I'm fully aware that my specific question isn't a PHP > general issue, but a PEAR related issue, more specific it's related to > PEAR:HTTP_Request, nevertheless I firmly believe it's of common interest. > > If you don't share my view, I'll be happy to be flamed in private, not on > list. Oh, you may not be happy, but you may well be flamed on list :-) > > Best regards, and wishes for a happy 2009, > Anders. > -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: SV: [PHP] Sending files via POST
Nathan Rixham's original email. Hope it helps! On Thu, Jan 1, 2009 at 09:35, Nathan Rixham wrote: > > after having a flick through the source it looks like a limitation of http > request; > http://pear.php.net/package/HTTP_Request/docs/latest/__filesource/fsource_HTTP_Request__HTTP_Request-1.4.4Request.php.html > check lines around 600 and 900+ > > you'd have to set the http request yourself i thinks! (setBody) > > may be worth contacting they who maintain the package > -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: SV: [PHP] Sending files via POST
Anders Norrbring wrote: On Thu, Jan 1, 2009 at 02:35, Anders Norrbring wrote: I'm a bit stuck.. I'm using the PEAR http_Request to send files and data as HTTP POST, which is working fine if I in fact have the files on disk on the server. Just using the method addFile.. Okay But what if the file data is only in a variable? It feels like overkill to first save to disk, and then read it in with addFile... The HTTP POST I'm looking at will need to add "files" both from disk and variables. then it's not a file, it's data held in RAM (non-TSR). Absolutely true, but the receiving end is expecting the data as a file upload. Are you looking to stream the file content (such as the header or initial $n bytes) from you local system to the server? If so, sorry, but you're in the wrong place. I don't really understand what you're asking for above, but to try to explain... My server is to create a HTTP POST request to another system, with a couple of "form variables" and also 2-3 "files". Much like a manual html form will do, but with no human intervention. Ideas are welcome.. My idea is to ask the question: how is the "file data" getting into the "variable"? Well, some of the "form values" are static, like user name etc. Then one file will be static (and stored on disk as a file) and added with method 'addData' to the POST request. Another "file" is generated dynamically from data stored in a SQL database and data provided by user input from visiting my site. Of course I can store this dynamically generated data to disk, add it with 'addData' and then delete it after the request is made, but it doesn't really feel like the right thing to do. Anders. after having a flick through the source it looks like a limitation of http request; http://pear.php.net/package/HTTP_Request/docs/latest/__filesource/fsource_HTTP_Request__HTTP_Request-1.4.4Request.php.html check lines around 600 and 900+ you'd have to set the http request yourself i thinks! (setBody) may be worth contacting they who maintain the package -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php