// URL to which the request must be sent
$mainUrl = "https://www.callfire.com/cloud/1/reports/calls/" . $campaignID;
// Parameters for the campaign finished notification subscription
$reportsParameters = array(
"apikey" => $apiKey,
"offset" => "0",
"startDate" => date("Ymd"),
"stopDate" => date("Ymd", strtotime("tomorrow"))
);
// Initialise and open the cURL connection
$reportsUrl = $mainUrl . "?" . http_build_query($reportsParameters);
$ch = curl_init($reportsUrl);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $reportsUrl);
// Execute the cURL request
$curlResponse = curl_exec($ch);
Comments
0 comments
Please sign in to leave a comment.