On Tue, 15 Feb 2005, Patrick H. Madden wrote:
Hi -- I'm trying to get post-file working with wget (1.9.1), talking to Apache 2.0.48, using PHP 4.3.4. This is all running on an x86 Linux machine with Mandrake 10.
If I do an http post of a file through an HTML form (fill in the blanks with a browser, hit submit), the PHP script catches all the data and files, and everything is cool. When I use wget, however, the file does not seem to make it there; I'm sure I'm doing something incorrectly--the man page is a bit vague on post-file.
The command I think should work with wget is
% wget -O foo.html --post-file data.txt --post-data "varname=worksfine" http://localhost/test.php
Is the PHP script possibly assuming that the post data is sent using formpost multipart encoding? Can you show us what the HTML <form> tag looks like that you use for a browser to do this?
--
-=- Daniel Stenberg -=- http://daniel.haxx.se -=-
ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
