curl-library
file upload
Date: Fri, 19 Jun 2009 16:35:32 +0530
hi,
I am uploading file using CURLOPT_POST but my fine is not getting uploaded.
plaese help.
curl_easy_setopt(curl, CURLOPT_URL, "
http://192.168.100.40//3108//ch_handoutadd.php");
curl_easy_setopt(curl, CURLOPT_PORT, 80);
curl_easy_setopt(curl, CURLOPT_VERBOSE ,1);
result = curl_easy_setopt(curl, CURLOPT_POSTFIELDS
,"file=winzip100.exe&id=AA48AT5R&connectedToJava=YES&uploadedfile=winzip100.exe&name=winzip100.exe");
curl_easy_setopt(curl, CURLOPT_POST, 1);
result = curl_easy_perform(curl);
at server page is getting called but the file is not uploadded.
following is output
* About to connect() to 192.168.100.40 port 80 (#0)
* Trying 192.168.100.40... * connected
* Connected to 192.168.100.40 (192.168.100.40) port 80 (#0)
> POST //3108//ch_handoutadd.php HTTP/1.1
Host: 192.168.100.40
Accept: */*
Content-Length: 96
Content-Type: application/x-www-form-urlencoded
< HTTP/1.1 200 OK
< Date: Thu, 18 Jun 2009 11:17:00 GMT
< Server: Apache/2.0.54 (Fedora)
< X-Powered-By: PHP/5.0.4
< Content-Length: 62
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
YESchandraAA48AT5R chadra22../AA48AT5R/Handouts/UPLOAD_FAILED* Closing
connecti
on #0
-- Regards, Chandrakant TERA INFORMATICS PVT LTDReceived on 2009-06-19