Overview

Namespaces

  • aliuly
    • common
      • selectors
    • loader
  • xPaw

Classes

  • ArmorItems
  • BasicCli
  • BasicHelp
  • BasicPlugin
  • ChatSession
  • Cmd
  • CmdSelector
  • ExpandVars
  • FastTransfer
  • FileUtils
  • FreezeSession
  • GetMotd
  • GetMotdAsyncTask
  • InvisibleSession
  • InvUtils
  • ItemName
  • mc
  • mc2
  • MoneyAPI
  • MPMU
  • Npc
  • PermUtils
  • PluginAsyncTask
  • PluginCallbackTask
  • PMScript
  • QueryAsyncTask
  • Rcon
  • RconTask
  • Session
  • ShieldSession
  • ShoppingCart
  • SignUtils
  • SkinUtils
  • SpySession
  • SubCommandMap
  • TPUtils
  • Overview
  • Namespace
  • Class

Class GetMotd

Get MOTD style data from Minecraft PE servers

Abstract
Namespace: aliuly\common
Located at aliuly/common/GetMotd.php
Methods summary
public static str|array
# query( str $Ip, integer $Port = 19132, integer $Timeout = 3 )

Query server

Query server

Parameters

$Ip
  • IP or hostname to query
$Port
  • Port to connect to
$Timeout
  • Timeout in seconds

Returns

str|array
  • string with error on array with results
protected static str|array
# pingServer( resource $sock )

Run protocol to get MOTD data

Run protocol to get MOTD data

Parameters

$sock

Returns

str|array
  • string with error or array with results
Constants summary
string MAGIC

Const

str - Magic string
# "\x00\xff\xff\x00\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78"
integer PING_OPEN_CONNECTION

Const

int - Ping Open connection packet id
# 0x01
integer PONG_OPEN_CONNECTION

Const

int - Pong Open connection packet id
# 0x1c
API documentation generated by ApiGen