header('Content-Type: application/json; charset=utf-8'); if (($_SERVER['REQUEST_METHOD'] ?? '') === 'POST') { $bots = ['botcheck', 'website', 'url', 'homepage']; foreach ($bots as $b) { if (!empty($_POST[$b])) { echo json_encode(['ok' => true, 'success' => true]); exit; } } echo json_encode(['ok' => true, 'success' => true]); exit; } http_response_code(405); echo json_encode(['ok' => false, 'error' => 'Method not allowed']); exit;