<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    header('Content-Type: application/json');
    $response_data = array(
        array(
            "result" => true,
            "rsp" => "R"
        )
    );

    $json_response = json_encode($response_data);

    header('Content-Length: ' . strlen($json_response));
    http_response_code(200);
    echo $json_response;
} else {
    http_response_code(405);
    echo json_encode(array("error" => "Method Not Allowed"));
}
?>