I am seeing nothing wrong in my code below. However, when i run in my browswer, i get the error array to string conversion
. What could i be missing in my code.
The error points to this line of code curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
Thank you for your help
$url = 'example.com/2394'
$curlFile = curl_file_create($file);
$data = [
'msg_code' => '',
'time' => ''
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
$result = json_decode($result, TRUE);