<?php require_once "/var/www/html/config.database.php"; ?>
<?php
require_once __DIR__ . '/config.php';
$raw = file_get_contents("php://input");

$db = fxh_db();
$stmt = $db->prepare("
INSERT INTO fxh_webhook_raw (license_key, raw)
VALUES (?, ?)
");

$license = substr($raw, 0, strpos($raw, ',')); // extract first segment
$stmt->bind_param("ss", $license, $raw);
$stmt->execute();

echo "OK";
?>
