Answer the question
In order to leave comments, you need to log in
How to send a file to curl?
Good day, it is required to transfer the file as one of the parameters
, now I use it like this
curl_setopt($curl, CURLOPT_POSTFIELDS, array(..., 'myfile' => '@test.csv'));
Answer the question
In order to leave comments, you need to log in
stackoverflow.com/questions/4223977/send-file-via-...
there is also a string-file, but I can’t find it right away,
see
stackoverflow.com/questions/3007253/send-post-xml-...
and here is the second answer
stackoverflow.com/questions/12667797/using-curl-to...
the main idea is the correct header, firstly - multipart, secondly - I don't remember the exact size , but it seems that the size includes all the POST data, not just the
check
file
simple - www.telerik.com/fiddler for help
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question