RE: [PHP] Question in posting form-data

2004-12-17 Thread Richard Lynch
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

RE: [PHP] Question in posting form-data

2004-12-17 Thread Yao, Minghua
] 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

Re: [PHP] Question in posting form-data

2004-12-16 Thread Erwin Kerk
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

RE: [PHP] Question in posting form-data

2004-12-16 Thread Richard Lynch
. -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

RE: [PHP] Question in posting form-data

2004-12-16 Thread Yao, Minghua
: 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

RE: [PHP] Question in posting form-data

2004-12-16 Thread Yao, Minghua
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

[PHP] Question in posting form-data

2004-12-15 Thread Yao, Minghua
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);