if($enable==0) { # сюда присылает неавторизированных пользователей файерволл if ($_SERVER['SERVER_NAME'] != "$servername.$domain_name") { header("location:http://$servername.$domain_name/index.php?add=" . urldecode($_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'])); exit; } I know that the authorization header has the following form:
header('HTTP/1.1 511 Network Authentication Required', TRUE, 511); Please tell me how to implement it correctly so that unauthorized users immediately get automatically (without switching to the browser with their hands) on captive portal detection?