mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 02:09:42 +00:00
Merge branch 'release/3.2'
This commit is contained in:
commit
4059e1f84c
@ -136,42 +136,32 @@ class Utils{
|
|||||||
return Utils::$ip;
|
return Utils::$ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
do{
|
$ip = Utils::getURL("http://api.ipify.org/");
|
||||||
$ip = Utils::getURL("http://api.ipify.org/");
|
if($ip !== false){
|
||||||
if($ip !== false){
|
return Utils::$ip = $ip;
|
||||||
Utils::$ip = $ip;
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$ip = Utils::getURL("http://checkip.dyndns.org/");
|
$ip = Utils::getURL("http://checkip.dyndns.org/");
|
||||||
if($ip !== false and preg_match('#Current IP Address\: ([0-9a-fA-F\:\.]*)#', trim(strip_tags($ip)), $matches) > 0){
|
if($ip !== false and preg_match('#Current IP Address\: ([0-9a-fA-F\:\.]*)#', trim(strip_tags($ip)), $matches) > 0){
|
||||||
Utils::$ip = $matches[1];
|
return Utils::$ip = $matches[1];
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$ip = Utils::getURL("http://www.checkip.org/");
|
$ip = Utils::getURL("http://www.checkip.org/");
|
||||||
if($ip !== false and preg_match('#">([0-9a-fA-F\:\.]*)</span>#', $ip, $matches) > 0){
|
if($ip !== false and preg_match('#">([0-9a-fA-F\:\.]*)</span>#', $ip, $matches) > 0){
|
||||||
Utils::$ip = $matches[1];
|
return Utils::$ip = $matches[1];
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$ip = Utils::getURL("http://checkmyip.org/");
|
$ip = Utils::getURL("http://checkmyip.org/");
|
||||||
if($ip !== false and preg_match('#Your IP address is ([0-9a-fA-F\:\.]*)#', $ip, $matches) > 0){
|
if($ip !== false and preg_match('#Your IP address is ([0-9a-fA-F\:\.]*)#', $ip, $matches) > 0){
|
||||||
Utils::$ip = $matches[1];
|
return Utils::$ip = $matches[1];
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$ip = Utils::getURL("http://ifconfig.me/ip");
|
$ip = Utils::getURL("http://ifconfig.me/ip");
|
||||||
if($ip !== false and trim($ip) != ""){
|
if($ip !== false and trim($ip) != ""){
|
||||||
Utils::$ip = trim($ip);
|
return Utils::$ip = trim($ip);
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}while(false);
|
|
||||||
|
|
||||||
return Utils::$ip;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user