hi,
I wanna know if there is a option for posting
data file with CURL? I find that there is a
CURLOPT_HTTPPOST option inside the doc. of libcurl, but I don't know how to set value for it,
For normal HTTP/POST, (application/x-www-form-urlencoded)
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://www.xxx.com/sth.html");
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"postvar=value");
curl_exec($ch);
curl_close($ch);
that's fine, but how to POST file?
Thx in advance~