(PHP 4 >= 4.1.0, PHP 5, PHP 7)
Queries the remote side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type
bool socket_getpeername ( resource $socket, string &$address [, int &$port ] )
Queries the remote side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type.
Parameters: