<?php
    // The data to insert
    $API = "l6OxVJilcD2cETMoNRvn";
    $Username = "StatusCake";
    $InsertData = array("WebsiteName" => "Testing", "Paused" => 0, "WebsiteURL" => "https://www.google.com", "CheckRate" => "1", "TestType" => "HTTP");

    // Create the CURL String
    $ch = curl_init("https://app.statuscake.com/API/Tests/Update");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
    curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($InsertData));
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
           "API: ".$API,
           "Username: ".$Username
    ));
    // For Debugging
    $Response = curl_exec($ch);
    $Response = json_decode($Response);

    // Check for success
    if ($Response->Success == 1) {
        echo 'Inserted Test!';
    } else { 
        echo 'Something Went Wrong<BR>';
        echo $Response->Message;
    }