<?php
$url = "https://office.birthsupportbd.xyz/proxy-services.php";

function testApi($action, $data) {
    global $url;
    $data['action'] = $action;
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36');
    $res = curl_exec($ch);
    $http = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    echo "--- Action: $action ---\n";
    echo "HTTP: $http\n";
    echo "Response: $res\n\n";
}

// 1. NID Check
testApi('nid_check', ['nid' => '8268076380', 'dob' => '1995-06-16']);

// 2. Parent Info
testApi('parent_info', ['ubrn' => '19943216719120280']);

// 3. Adv Info
testApi('adv_info', ['ubrn' => '19943216719120280']);

// 4. Alive Status
testApi('alive_status', ['ubrn' => '19943216719120280']);

// 5. App Status
testApi('app_status', ['searchValue' => '262246869']);
