PocketMine
|
Static Public Member Functions | |
static | getCallableIdentifier (callable $variable) |
static | randomUUID () |
static | dataToUUID (...$params) |
static | toUUID ($data, $version=2, $fixed="8") |
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 | getRandomBytes ($length=16, $secure=true, $raw=true, $startEntropy="", &$rounds=0, &$drop=0) |
static | getURL ($page, $timeout=10, array $extraHeaders=[]) |
static | postURL ($page, $args, $timeout=10, array $extraHeaders=[]) |
Static Public Attributes | |
static | $online = true |
static | $ip = false |
static | $os |
Big collection of functions
|
static |
|
static |
Generates an unique identifier to a callable
callable | $variable |
|
static |
Gets the External IP using an external service, it is cached
bool | $force | default false, force IP check even when cached |
|
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.
string | $extra | optional, additional data to identify the machine |
|
static |
Returns the current Operating System Windows => win MacOS => mac iOS => ios Android => android Linux => Linux BSD => bsd Other => other
|
static |
This function tries to get all the entropy available in PHP, and distills it to get a good RNG.
int | $length | default 16, Number of bytes to generate |
bool | $secure | default true, Generate secure distilled bytes, slower |
bool | $raw | default true, returns a binary string if true, or an hexadecimal one |
string | $startEntropy | default null, adds more initial entropy |
int | &$rounds | Will be set to the number of rounds taken |
int | &$drop | Will be set to the amount of dropped bytes |
|
static |
GETs an URL using cURL
$page | ||
int | $timeout | default 10 |
array | $extraHeaders |
|
static |
Returns a prettified hexdump
string | $bin |
|
static |
POSTs data to an URL
$page | ||
array | string | $args | |
int | $timeout | |
array | $extraHeaders |
|
static |
Returns a string that can be printed, replaces non-printable characters
$str |
|
static |
|
static |