Webhook Get Submission

When a client submit their submission, you can get the data and save it to your own system or do anything with it.

Copy and use it however you like on your system.

<?php
header('Content-Type: application/json; charset=utf-8');

$json = file_get_contents('php://input');
$data = json_decode($json, true);
$sender = $data["sender"];
$submission = $data["submission"];
$name = $data["name"];
$list = $data["data"];     


function sendFonnte($target, $data)
{
    $curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://api.fonnte.com/send",
        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 => array(
            'target' => $target,
            'message' => $data["message"],
        ),
        CURLOPT_HTTPHEADER => array(
            "Authorization: TOKEN"
        ),
    ));

    $response = curl_exec($curl);

    curl_close($curl);

    return $response;
}
$reply = [
    "message" => $json
];
sendFonnte("082227097005", $reply); //change number to your own number

Available parameter

  • Submission- The submission name
  • Sender - Sender's whatsapp number
  • Name - The sender's name
  • List - The submission data

Related knowledge

See more
Made with in Indonesia