I have a PHP file that triggers an API call when a user fills out a form on my site. At the end of the API call, it returns the response.
Where/how can I actually see this response? Filling out the form on the site runs the PHP file, but I'm not sure where it's actually outputting the response at.
Visting /myFile.php doesn't work because it's missing required inputs to actually run the API call.
Any help is much appreciated..
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.sendinblue.com/v3/smtp/email',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>json_encode($payload),
CURLOPT_HTTPHEADER => array(
'api-key: hidden',
'Content-Type: application/json',
'Cookie: __cfduid=dad4a689606c86c195e4d8ce33b53c5c51611684716'
),
));
$response = curl_exec($curl);
curl_close($curl);
return json_decode($response, true);