Nov 24, 2017
0
Level 1
Image send to webservice using cURL CURLOPT_POSTFIELDS in laravel
I want send $bodydata and $imageData to the webservice using cURL CURLOPT_POSTFIELDS in laravel
Any one can help.
This is my code :
$postfields = array();
$postfields['bodydata '] = $bodydata ;
$postfields['imageData '] = $imageData ;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: multipart/form-data'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
curl_close($ch)
Please or to participate in this conversation.