detectportal/public/index.php

18 lines
469 B
PHP

<?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');
// }