<?php

$storedKey = "Y7kR3zAqP9sW2xL5cV1bN8jM6hT4eF0gU2iO1kX4nC8dV3bN7jM5hT2eR0gU1iO9";
$storedKeyResp = "R2bE7XhP9jY4sU6zD8mF1wC5lN0kA3oVtQeZ7uI2xG4vK9pT3mJ1fR5aL0kB3nH6cV9sX2dE4mF1wC5lN0kA3oVtQeZ7uI2";

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $key = $_POST['key'];

    if ($key == $storedKey) {
        $response = array();
        $response['success'] = true;
        $response['key'] = $storedKeyResp;
        $response['message'] = "Valid license!";
        echo json_encode($response);
    } else {
        $response = array();
        $response['success'] = false;
        $response['key'] = "null";
        $response['message'] = "License error.";
        echo json_encode($response);
    }
}
?>
