Sends a call to "PHONENUMBER" and also appends some extra data to the number. The extra information fields can be used for ${call.field.X} variables.
<?
$CF_URL = "https://www.callfire.com/cloud/1/campaign/{campaignid}/call";
// Setup your Parameters for an outbound campaign
$params = array (
"apikey" => "XxxxxxxxxxxxxxxxxxxxxxxX",
"numbers" => "PHONENUMBER,extra1"
);
print $CF_URL;
$http = curl_init($CF_URL);
curl_setopt($http, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($http, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($http, CURLOPT_RETURNTRANSFER, true);
curl_setopt($http, CURLOPT_URL, $CF_URL);
curl_setopt($http, CURLOPT_POST, true);
curl_setopt($http, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($http, CURLOPT_HTTPHEADER, array('Content-Type: text/plain'));
$resp = curl_exec($http);
print "<br />Response: ";
var_dump($resp);
print "<br />Errors: ";
var_dump( curl_error($http) );
print "<br />";
?>
