<?php
require __DIR__ . '/config.php';

$ip = $_SERVER['REMOTE_ADDR'];
$ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';

$status = processAccess($ip, $ua);

if ($status === 'liberado') {
    header('Location: index1.php');
    exit;
}

header('HTTP/1.1 503 Service Unavailable');
exit;

