$curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "https://trackcmp.net/event"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, array( "actid" => "66543352", "key" => "71ab8fa181437d0f65be60effabb30398a13574d", "event" => "video_70Fermentos", "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); }