new server class

This commit is contained in:
2025-08-16 09:03:01 -04:00
parent 510a371b87
commit 35544d4e75
4 changed files with 28 additions and 29 deletions

View File

@@ -1,5 +1,15 @@
<?php
function ping($host, $port, $timeout){return fSockOpen($host, $port, $errno, $errstr, $timeout);}
class Server{
public $NAME; public $HOST; public $PORT; public $PING;
public function __construct($NAME,$HOST,$PORT) {
$this->NAME = $NAME; $this->HOST = $HOST; $this->PORT = $PORT; $this->PING = ping($HOST, $PORT, 0.5);
}
function ping($host, $port, $timeout){return fSockOpen($host, $port, $errno, $errstr, $timeout);}
}
class ServerStatus {
private $status = array();