| Fully Qualified Name: | Zend\Http\PhpEnvironment\RemoteAddress |
Functionality for determining client IP address.
| Name | Description | Defined By |
|---|---|---|
| getIpAddress() | Returns client IP address. | RemoteAddress |
| getUseProxy() | Checks proxy handling setting. | RemoteAddress |
| setProxyHeader() | Set the header to introspect for proxy IPs | RemoteAddress |
| setTrustedProxies() | Set list of trusted proxy addresses | RemoteAddress |
| setUseProxy() | Changes proxy handling setting. | RemoteAddress |
Returns client IP address.
Returns: string IP address.
Checks proxy handling setting.
Returns: bool Current setting value.
Set the header to introspect for proxy IPs
| Parameter Name | Type | Description |
|---|---|---|
| $header | string |
Returns: \RemoteAddress
Set list of trusted proxy addresses
| Parameter Name | Type | Description |
|---|---|---|
| $trustedProxies | array |
Returns: \RemoteAddress
Changes proxy handling setting.
This must be static method, since validators are recovered automatically at session read, so this is the only way to switch setting.
| Parameter Name | Type | Description |
|---|---|---|
| $useProxy | bool | Whether |
Returns: \RemoteAddress