Function __global->get_server_ips
Definitions
sources/global3.php
- Get possible IP addresses of the server.In order of what is most likely what the server considers itself. The first entry may be used for server loopback connections.Also see get_localhost_ips().
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $local_interface_only | boolean | No | No | False | N/A | N/A | Whether to only get IP addresses that are on a local network interface |
Returns
- IP addresses
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get possible IP addresses of the server.In order of what is most likely what the server considers itself. The first entry may be used for server loopback connections.Also see get_localhost_ips().
*
* @param boolean $local_interface_only Whether to only get IP addresses that are on a local network interface
* @return array IP addresses
*/
function get_server_ips(bool $local_interface_only = false) : array
* Get possible IP addresses of the server.In order of what is most likely what the server considers itself. The first entry may be used for server loopback connections.Also see get_localhost_ips().
*
* @param boolean $local_interface_only Whether to only get IP addresses that are on a local network interface
* @return array IP addresses
*/
function get_server_ips(bool $local_interface_only = false) : array
