mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2024-10-31 18:27:46 +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];}
|
||
|
}
|
||
|
?>
|