mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-24 21:49:43 +00:00
Added new IP site
This commit is contained in:
parent
f476cf6943
commit
c77a3c2f87
1 changed files with 6 additions and 1 deletions
|
|
@ -60,11 +60,16 @@ class Utils extends Thread{
|
|||
$ip = Utils::curl_get("http://checkmyip.org/");
|
||||
if(preg_match('#Your IP address is ([0-9a-fA-F\:\.]*)#', $ip, $matches) > 0){
|
||||
return $matches[1];
|
||||
}else{
|
||||
$ip = trim(Utils::curl_get("http://ifconfig.me/ip"));
|
||||
if($ip != ""){
|
||||
return $ip;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue