Query: getprotobyname
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
GETPROTOBYNAME(3) 1 GETPROTOBYNAME(3) getprotobyname - Get protocol number associated with protocol nameSYNOPSISint getprotobyname (string $name)DESCRIPTIONgetprotobyname(3) returns the protocol number associated with the protocol $name as per /etc/protocols.PARAMETERSo $name - The protocol name.RETURN VALUESReturns the protocol number, or FALSE on failure.EXAMPLESExample #1 getprotobyname(3) example <?php $protocol = 'tcp'; $get_prot = getprotobyname($protocol); if ($get_prot === FALSE) { echo 'Invalid Protocol'; } else { echo 'Protocol #' . $get_prot; } ?>SEE ALSOgetprotobynumber(3). PHP Documentation Group GETPROTOBYNAME(3)
Related Man Pages |
---|
getprotoent(3) - freebsd |
getprotobynumber(3) - mojave |
endprotoent(3) - netbsd |
getprotobyname(3) - netbsd |
setprotoent(3) - netbsd |
Similar Topics in the Unix Linux Community |
---|
getprotobyname replacement? |