(PHP 4, PHP 5, PHP 7)

getprotobyname Ottiene il numero del protocollo associato al nome del protocollo


getprotobyname ( string $nome ) : int

getprotobyname() restituisce il numero del protocollo associato al protocollo nome come in /etc/protocols.

Vedere anche: getprotobynumber().

add a note add a note

User Contributed Notes 1 note

Vipindas K.S
11 years ago

getprotobyname() gives the protocol number for the given protocol name on the local system.
If the protocol is not recognized, then the function returns -1.
The given code snippet gives the list of protocols along with their protocol numbers
"rdp","rvd" );
//Reads the names of protocols into an array..
echo $proname .":", getprotobyname ($proname)."<br />";

To Top