mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Added timeout to Utils::getOnline(), fixes #1071 [gh#1071]
This commit is contained in:
parent
b63e49acf8
commit
70445bdeba
1 changed files with 1 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ class Utils{
|
|||
public static $ip = false;
|
||||
|
||||
public static function isOnline(){
|
||||
return ((@fsockopen("google.com", 80) !== false or @fsockopen("www.linux.org", 80) !== false or @fsockopen("www.php.net", 80) !== false) ? true:false);
|
||||
return ((@fsockopen("google.com", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.linux.org", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.php.net", 80, $e = null, $n = null, 2) !== false) ? true:false);
|
||||
}
|
||||
|
||||
public static function getIP($force = false){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue