mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +00:00
Removed a method to get the IP
This commit is contained in:
parent
cd05434853
commit
8bc40d2d9c
@ -42,14 +42,13 @@ class Utils extends Thread{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function getIP(){
|
public static function getIP(){
|
||||||
$ip = trim(Utils::curl_get("http://automation.whatismyip.com/n09230945.asp"));
|
$ip = "";//trim(Utils::curl_get("http://automation.whatismyip.com/n09230945.asp"));
|
||||||
if($ip != ""){
|
if($ip != ""){
|
||||||
return $ip;
|
return $ip;
|
||||||
}else{
|
}else{
|
||||||
$ip = trim(Utils::curl_get("http://checkip.dyndns.org/"));
|
$ip = trim(strip_tags(Utils::curl_get("http://checkip.dyndns.org/")));
|
||||||
$ip = preg_replace("/Current IP Address: (.*)/", '$1', $ip);
|
if(preg_match('/Current IP Address\: (.*)/', $ip, $matches) > 0){
|
||||||
if($ip != ""){
|
return $matches[1];
|
||||||
return $ip;
|
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user