getservbyport
Get Internet services corresponding to ports and protocols
getservbyport() function returns the Internet service name of the given port and protocol.
An example of getservbyport() :
<?php $intservname = getservbyport ( 80 , "tcp" ) ; echo $intservname ; ?>
getservbyport ( port , protocol )
| parameter | describe |
|---|---|
| port | Required. Specify the port number (such as 80). |
| protocol | Required. Specify a protocol name (such as "tcp" or "udp"). |