mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2024-11-13 22:27:26 +00:00
12 lines
208 B
PHP
12 lines
208 B
PHP
|
<?php
|
||
|
function GetServerStatus($site, $port)
|
||
|
{
|
||
|
$status = array("OFFLINE", "ONLINE");
|
||
|
$fp = @fsockopen($site, $port, $errno, $errstr, 2);
|
||
|
if (!$fp) {
|
||
|
return $status[0];
|
||
|
} else
|
||
|
{ return $status[1];}
|
||
|
}
|
||
|
?>
|