English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The getservbyport() function retrieves the Internet service corresponding to the port and protocol.
string getservbyport ( int $port , string $protocol )
Used to obtain the Internet service corresponding to the port number
Returns the Internet service name in string format. Returns false on failure.
Serial number | Parameters and descriptions |
---|---|
1 | port port number |
2 | protocol The protocol is "tcp" or "udp" (lowercase). |