|
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 | $online = true |
|
static | $ip = false |
|
static | $os |
|
Big collection of functions
static getCallableIdentifier |
( |
callable |
$variable | ) |
|
|
static |
Generates an unique identifier to a callable
- Parameters
-
- Returns
- string
static getIP |
( |
|
$force = false | ) |
|
|
static |
Gets the External IP using an external service, it is cached
- Parameters
-
bool | $force | default 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 | $extra | optional, 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
-
- Returns
- string
static getURL |
( |
|
$page, |
|
|
|
$timeout = 10 , |
|
|
array |
$extraHeaders = [] |
|
) |
| |
|
static |
GETs an URL using cURL
- Parameters
-
| $page | |
int | $timeout | default 10 |
array | $extraHeaders | |
- Returns
- bool|mixed
Returns a prettified hexdump
- Parameters
-
- 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
Returns a string that can be printed, replaces non-printable characters
- Parameters
-
- Returns
- string
The documentation for this class was generated from the following file:
- src/pocketmine/utils/Utils.php