Reputation: 101
How can I execute such request using PHP and Curl?
curl -v -X POST --data-binary @"myJpegFile.jpg" http://bol.cinovatech.com /newcrunch/1441749032/MmRhMmYwYzk4OWY2Y2IyNzNlNTU1MmMwOTUyNTE5YzY4YjJiOTIxNg== > outPutFile.jpg
Upvotes: 0
Views: 39
Reputation: 6661
Try this code for send file :-
curl_setopt(
$request,
CURLOPT_POSTFIELDS,
array(
'file' =>
'@' . $_FILES['file']['tmp_name']
. ';filename=' . $_FILES['file']['name']
. ';type=' . $_FILES['file']['type']
));
Upvotes: 1