0

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
Lindar
  • 101
  • 4
  • 1
    Possible duplicate of [PHP + curl, HTTP POST sample code?](http://stackoverflow.com/questions/2138527/php-curl-http-post-sample-code) – vard Dec 02 '15 at 10:38

1 Answers1

1

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']
    ));
Abhishek Sharma
  • 6,689
  • 1
  • 14
  • 20