getservbyname

(PHP 4 )

getservbyname --  인터넷 서비스와 프로토콜과 조합이 되어있는 포트 번호를 가져옵니다.

Description

int getservbyname ( string service, string protocol)

getservbyname()/etc/services 에 정의된 protocolservice에 대응이 되는 인터넷 포트를 반환합니다. protocolTCP 이거나 UDP입니다.

참조: getservbyport().