OTS_ServerInfo __construct(
string
$server, int
$port
)
|
|
Creates handler for new server.
Creates handler for new server.
Parameters:
|
string |
$server: |
Server IP/domain. |
|
int |
$port: |
OTServ port. |
API Tags:
Information Tags:
| Version: | 0.1.4 |
| Since: | 0.1.4 |
Queries server information.
Queries server information.
This method uses binary info protocol. It provides more infromation then OTS_Toolbox::serverStatus().
Parameters:
|
int |
$flags: |
Requested info flags. |
API Tags:
| Return: | Respond content document (false when server is offline). |
| Access: | public |
| Example: | info.php |
Information Tags:
| Tutorial: | Server online status |
| Version: | 0.1.4 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.4 |
bool playerStatus(
string
$name
)
|
|
Checks player online status.
Checks player online status.
This method uses binary info protocol.
Parameters:
|
string |
$name: |
Player name. |
API Tags:
| Return: | True if player is online, false if player or server is online. |
| Access: | public |
| Example: | info.php |
Information Tags:
| Tutorial: | Server online status |
| Version: | 0.1.4 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.4 |
Queries server status.
Queries server status.
Sends 'info' packet to OTS server and return output. Returns OTS_InfoRespond (wrapper for XML data) with results or false if server is online.
API Tags:
| Return: | Respond content document (false when server is offline). |
| Access: | public |
| Example: | info.php |
Information Tags:
| Tutorial: | Server online status |
| Version: | 0.1.4 |
| Throws: | DOMException On DOM operation error. |
| Since: | 0.1.4 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
void __get(
string
$name, mixed
$value
)
|
|
Magic PHP5 method.
Magic PHP5 method.
Parameters:
|
string |
$name: |
Property name. |
|
mixed |
$value: |
Property value. |
API Tags:
Information Tags:
| Version: | 0.1.4 |
| Throws: | OutOfBoundsException For non-supported properties. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.4 |