Re: SV: [PHP] Sending files via POST

2009-01-06 Thread Shawn McKenzie
Anders Norrbring wrote:
 On Fri, Jan 2, 2009 at 14:14, Anders Norrbring li...@norrbring.se
 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



SV: SV: [PHP] Sending files via POST

2009-01-03 Thread Anders Norrbring
 Nathan Rixham's original email.  Hope it helps!
 
 On Thu, Jan 1, 2009 at 09:35, Nathan Rixham nrix...@gmail.com 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/fsour
 ce_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
 


Thanks Daniel.
I sure looks like I have to either do it manually, or modify the HTTP
Request code myself, something I'm a bit reluctant to do..

I guess the better way is to learn how to build the HTTP body and use the
setBody method, so I'll do some Googling on the subject if somebody here
can't point me to a good 'how-to' right away..

Anders.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



SV: [PHP] Sending files via POST

2009-01-02 Thread Anders Norrbring
*bump*

   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.
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



SV: [PHP] Sending files via POST

2009-01-02 Thread Anders Norrbring
 On Fri, Jan 2, 2009 at 14:14, Anders Norrbring li...@norrbring.se
 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.

Best regards, and wishes for a happy 2009,
Anders.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: SV: [PHP] Sending files via POST

2009-01-02 Thread Daniel Brown
Nathan Rixham's original email.  Hope it helps!

On Thu, Jan 1, 2009 at 09:35, Nathan Rixham nrix...@gmail.com 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 P. Brown
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



SV: [PHP] Sending files via POST

2009-01-01 Thread Anders Norrbring
 On Thu, Jan 1, 2009 at 02:35, Anders Norrbring and...@norrbring.se
 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.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: SV: [PHP] Sending files via POST

2009-01-01 Thread Nathan Rixham

Anders Norrbring wrote:

On Thu, Jan 1, 2009 at 02:35, Anders Norrbring and...@norrbring.se
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