<?php
require_once '../config.php';

$raw = file_get_contents("php://input");
$data = json_decode($raw, true);
if(!$data){ die("Invalid JSON"); }

$license = $data['license'];
$symbol  = $data['symbol'];
$action  = $data['action'];
$tf      = $data['timeframe'];

$stmt = $conn->prepare("
INSERT INTO fxh_signal_logs 
(license_key, raw_signal, symbol, action, timeframe)
VALUES (?,?,?,?,?)
");
$stmt->bind_param("sssss", $license, $raw, $symbol, $action, $tf);
$stmt->execute();
$stmt->close();

echo "OK";
