Yao, Minghua wrote:
Yes. I did modify the original since I need to send data to a program
which takes only form-data.
content-disposition: came from RFC 2388. I don't think the program can
take application/x-www-form-urlencoded content. Further help needed.
Try it the old way -- I suspect
]
Sent: Fri 12/17/2004 11:27 AM
To: Yao, Minghua
Cc: Erwin Kerk; [EMAIL PROTECTED]
Subject: RE: [PHP] Question in posting form-data
Yao, Minghua wrote:
Yes. I did modify the original since I need to send data to a program
which takes only form-data.
content-disposition: came from RFC 2388. I
Yao, Minghua wrote:
Hi, all,
I am testing how to post form-data to a host using the following code
(test.php):
?php
function PostToHost($host, $path, $name, $value) { // Test of posting
form-data
$fp = fsockopen($host,80);
fputs($fp, POST
.
-Minghua
-Original Message-
From: Erwin Kerk [mailto:[EMAIL PROTECTED]
Sent: Thu 12/16/2004 6:30 AM
To: Yao, Minghua
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Question in posting form-data
Yao, Minghua wrote:
Hi, all,
I am testing how to post form-data to a host using the following
: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Thu 12/16/2004 11:46 AM
To: Yao, Minghua
Cc: Erwin Kerk; [EMAIL PROTECTED]
Subject: RE: [PHP] Question in posting form-data
You also need to URLEncode the $value, either before you pass it in, or
inside the function itself.
Where did you get this PostToHost
Thanks. I changed
fputs($fp, $value\n);
to
fputs($fp, $name=$value\n);
But I still got the same message.
-Minghua
-Original Message-
From: Erwin Kerk [mailto:[EMAIL PROTECTED]
Sent: Thu 12/16/2004 6:30 AM
To: Yao, Minghua
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Question in posting
Hi, all,
I am testing how to post form-data to a host using the following code
(test.php):
?php
function PostToHost($host, $path, $name, $value) { // Test of posting
form-data
$fp = fsockopen($host,80);
fputs($fp, POST $path HTTP/1.1\n);
7 matches
Mail list logo