init
This commit is contained in:
commit
51b19bc743
4 changed files with 22 additions and 0 deletions
1
public/canonical.html
Normal file
1
public/canonical.html
Normal file
|
@ -0,0 +1 @@
|
|||
<meta http-equiv="refresh" content="0;url=https://support.mozilla.org/kb/captive-portal"/>
|
18
public/index.php
Normal file
18
public/index.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?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');
|
||||
}
|
||||
// Source: https://www.encrypted.at/firefox-captive-portal-url/
|
2
public/ip.php
Normal file
2
public/ip.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?=$_SERVER['REMOTE_ADDR']?>
|
||||
|
1
public/success.txt
Normal file
1
public/success.txt
Normal file
|
@ -0,0 +1 @@
|
|||
success
|
Loading…
Reference in a new issue