detectportal/public/index.php

19 lines
451 B
PHP
Raw Normal View History

2021-07-19 22:09:55 +02:00
<?php
if ($_SERVER['REDIRECT_URL']=='/ip'){
print($_SERVER['REMOTE_ADDR']);
die("\n");
}
$ua = $_SERVER['HTTP_USER_AGENT'];
if ($_SERVER['REDIRECT_URL']=='/ua'){
print($ua);
die("\n");
}
$slash = strrchr($ua,'/');
$ffversion = intval(substr($slash,1));
if ($ffversion >= 89){
die('<meta http-equiv="refresh" content="0;url=https://support.mozilla.org/kb/captive-portal"/>');
} else {
die('success');
}
2021-08-01 18:53:19 +02:00