<?php
/**
 * Notice API Proxy
 * 
 * This proxy handles notice API requests by directly including the local API.
 * No remote connection needed - everything runs locally for better performance.
 */
ob_start();
error_reporting(E_ERROR | E_PARSE);
ini_set('display_errors', '0');
header('Content-Type: application/json');

// Directly include the local notice API - no cURL needed
$local_api = __DIR__ . '/notice_api.php';

if (file_exists($local_api)) {
    ob_start();
    include $local_api;
    $resp = ob_get_clean();
    if (ob_get_length()) { ob_clean(); }
    echo $resp;
} else {
    if (ob_get_length()) { ob_clean(); }
    http_response_code(500);
    echo json_encode(['response'=>0,'msg'=>'Notice API not found']);
}
