<?php
// 1. The Tarpit: Force the script to sleep for 5 seconds.
// This holds the bot's connection open, slowing down its scraping script.
sleep(5);

// 2. Disable caching so the bot keeps trying to fetch fresh data
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

// 3. Return a 403 Forbidden status. Polite bots will leave; bad bots will keep trying.
header("HTTP/1.1 403 Forbidden");

// 4. Send headers indicating a JSON response to make the endpoint look authentic
header("Content-Type: application/json");

// 5. Output fake, tantalizing telemetry data. 
// This tricks the bot's parsing logic into thinking it found a valuable, undocumented API.
$fake_telemetry_data = [
    "status" => "error",
    "message" => "Invalid API Token",
    "system" => "SIMETRI-JATIM_Debug",
    "active_node" => "AWS-Pasuruan",
    "diagnostics" => [
        "cpu_load" => [0.85, 0.62, 0.55],
        "memory_usage_mb" => 845,
        "uptime_seconds" => 1209600,
        "database_conn" => "failed",
        "last_sync" => date("Y-m-d H:i:s")
    ]
];

echo json_encode($fake_telemetry_data, JSON_PRETTY_PRINT);
?>