<?php
require 'includes/ProxyHelper.php';
$helper = new ProxyHelper();

$urls = [
    'https://bdris.gov.bd/admin/',
    'https://bdris.gov.bd/admin/br/search',
    'https://bdris.gov.bd/admin/dashboard',
    'https://bdris.gov.bd/br/application',
    'https://bdris.gov.bd/api/user/profile'
];

foreach ($urls as $url) {
    echo "====================================\n";
    echo "Testing URL: $url\n";
    $res = $helper->fetch($url, 'GET', [], false, 'https://bdris.gov.bd/');
    echo "HTTP CODE: " . $res['status'] . "\n";
    preg_match('/<title>(.*?)<\/title>/i', $res['body'], $m);
    echo "TITLE: " . ($m[1] ?? 'No Title') . "\n";
    echo "BODY (first 200 chars): " . substr(trim(strip_tags($res['body'])), 0, 200) . "\n\n";
}
