views:

223

answers:

2

does curl function need any special option to post multipart/form-data ?

+1  A: 

Use curl's -F (or --form) and --form-string options to POST multipart/form-data.

That is, assuming you are talking about the curl program, not the libcurl library. This wasn't clear from your question.

Marcelo Cantos
thanks Marcelo,but i am talking about libcurl in php
hd
+2  A: 

Use curl_setopt() to set CURLOPT_POSTFIELDS to an associative array.

Adam Backstrom