Send data to make.com webhook

Below is the code to send the data to make.com webhook:

// Replace the below url with your make.com webhook url
$url="https://hook.eu1.make.com/abcdefghijklmnopqrstuvwxyz";
    $data = '{
    "var1": "test name",
    "var2": "test@email.com",
    }';

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json'
    ));

    $result = curl_exec($ch);