IIpResolver
in
Interface for IP address resolution strategies.
Implementations of this interface define how to extract the client's IP address from server variables, handling various proxy and load balancer configurations.
Table of Contents
Methods
- resolve() : string
- Resolve the client IP address from server variables.
Methods
resolve()
Resolve the client IP address from server variables.
public
resolve(array<string|int, mixed> $server) : string
Parameters
- $server : array<string|int, mixed>
-
The $_SERVER array containing request information
Return values
string —The resolved IP address (returns '0.0.0.0' if unable to resolve)