SunshinePHP 2016


(PHP 4, PHP 5)

getprotobyname Ottiene il numero del protocollo associato al nome del protocollo


int getprotobyname ( string $nome )

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
7 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