Genisys  Genisys API 1.9.3
A server software for Minecraft: Pocket Edition with many features
Utils Class Reference

Static Public Member Functions

static getCallableIdentifier (callable $variable)
 
static getMachineUniqueId ($extra="")
 
static getIP ($force=false)
 
static getOS ($recalculate=false)
 
static getRealMemoryUsage ()
 
static getMemoryUsage ($advanced=false)
 
static getThreadCount ()
 
static getCoreCount ($recalculate=false)
 
static hexdump ($bin)
 
static printable ($str)
 
static getURL ($page, $timeout=10, array $extraHeaders=[])
 
static postURL ($page, $args, $timeout=10, array $extraHeaders=[])
 
static javaStringHash ($string)
 

Static Public Attributes

static $online = true
 
static $ip = false
 
static $os
 

Detailed Description

Big collection of functions

Member Function Documentation

static getCallableIdentifier ( callable  $variable)
static

Generates an unique identifier to a callable

Parameters
callable$variable
Returns
string
static getIP (   $force = false)
static

Gets the External IP using an external service, it is cached

Parameters
bool$forcedefault false, force IP check even when cached
Returns
string
static getMachineUniqueId (   $extra = "")
static

Gets this machine / server instance unique ID Returns a hash, the first 32 characters (or 16 if raw) will be an identifier that won't change frequently. The rest of the hash will change depending on other factors.

Parameters
string$extraoptional, additional data to identify the machine
Returns
UUID
static getOS (   $recalculate = false)
static

Returns the current Operating System Windows => win MacOS => mac iOS => ios Android => android Linux => Linux BSD => bsd Other => other

Parameters
bool$recalculate
Returns
string
static getURL (   $page,
  $timeout = 10,
array  $extraHeaders = [] 
)
static

GETs an URL using cURL

Parameters
$page
int$timeoutdefault 10
array$extraHeaders
Returns
bool|mixed
static hexdump (   $bin)
static

Returns a prettified hexdump

Parameters
string$bin
Returns
string
static postURL (   $page,
  $args,
  $timeout = 10,
array  $extraHeaders = [] 
)
static

POSTs data to an URL

Parameters
$page
array | string$args
int$timeout
array$extraHeaders
Returns
bool|mixed
static printable (   $str)
static

Returns a string that can be printed, replaces non-printable characters

Parameters
$str
Returns
string

The documentation for this class was generated from the following file: