GETSERVBYPORT(3) 1 GETSERVBYPORT(3)
getservbyport - Get Internet service which corresponds to port and protocol
SYNOPSIS
string getservbyport (int $port, string $protocol)
DESCRIPTION
getservbyport(3) returns the Internet service associated with $port for the specified $protocol as per /etc/services.
PARAMETERS
o $port
- The port number.
o $protocol
-$protocol is either "tcp" or "udp" (in lowercase).
RETURN VALUES
Returns the Internet service name as a string.
SEE ALSO
getservbyname(3).
PHP Documentation Group GETSERVBYPORT(3)