mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2024-12-23 01:52:41 +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];}
|
||
|
}
|
||
|
?>
|