Current Location: Home> Function Categories> getprotobyname

getprotobyname

Get the protocol number associated with the protocol name
Name:getprotobyname
Category:Network
Programming Language:php
One-line Description:Returns the protocol number of the given protocol name.

Definition and usage

getprotobyname() function returns the protocol number of the given protocol name.

Example

An example getprotobyname() :

 <?php
$protocolnum = getprotobyname ( "tcp" ) ;
echo $protocolnum ;
?>

grammar

 getprotobyname ( protocolname )

Parameter value

parameter describe
protocolname Required. Specify the protocol name (such as "tcp").
Similar Functions
Popular Articles