curl_setopt($curl, CURLOPT_POSTFIELDS, array(
"actid" => "224171163",
"key" => "2968ec1bea462fa87c8d44228739fcb028e55953",
"event" => "YOUR_EVENT",
"eventdata" => "ANY_DATA",
"visit" => json_encode(array(
// If you have an email address, assign it here.
"email" => "",
)),
));
$result = curl_exec($curl);
if ($result !== false) {
$result = json_decode($result);
if ($result->success) {
echo 'Success! ';
} else {
echo 'Error! ';
}
echo $result->message;
} else {
echo 'cURL failed to run: ', curl_error($curl);
}