getservbyname

 int getservbyname ( string $service , string $protocol ) 

説明

getservbyname() returns the Internet port which corresponds to service for the specified protocol as per /etc/services.

戻り値

Returns the port number, or FALSE if service or protocol is not found.