POT
POT
POT
Main menu

Download

Forum

SVN

Class: OTS_ServerInfo

Source Location: /classes/OTS_ServerInfo.php

Class OTS_ServerInfo

Class Overview

Various server status querying methods.

Various server status querying methods.

Located in /classes/OTS_ServerInfo.php [line 22]



		
				Author(s):
		
API Tags:
Property-read:  OTS_InfoRespond|bool $status: status() method wrapper.
Property-read:  OTS_ServerStatus|bool $info: Full info() method wrapper.

Information Tags:
Version:  0.1.4
Since:  0.1.4

Methods

[ Top ]
Method Summary
OTS_ServerInfo   __construct()   Creates handler for new server.
OTS_ServerStatus|bool   info()   Queries server information.
bool   playerStatus()   Checks player online status.
OTS_InfoRespond|bool   status()   Queries server status.
void   __get()   Magic PHP5 method.

[ Top ]
Methods
Constructor __construct  [line 44]

  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:
Access:  public

Information Tags:
Version:  0.1.4
Since:  0.1.4

[ Top ]
info  [line 145]

  OTS_ServerStatus|bool info( int $flags  )

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

[ Top ]
playerStatus  [line 179]

  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

[ Top ]
status  [line 109]

  OTS_InfoRespond|bool status( )

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.

[ Top ]
__get  [line 209]

  void __get( string $name, mixed $value  )

Magic PHP5 method.

Magic PHP5 method.

Parameters:
string   $name:  Property name.
mixed   $value:  Property value.

API Tags:
Access:  public

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

[ Top ]