Example
A getprotobyname() example:
html
<?php
$protocolnum = getprotobyname("tcp");
echo $protocolnum;
?>
Definition and Usage
The getprotobyname() function returns the protocol number for a given protocol name.
Syntax
text
getprotobyname(protocolname)
Parameter Values
| Parameter | Description |
|---|---|
| protocolname | Required. Specifies a protocol name (like "tcp") |
Technical Details
| Return Value: | The protocol number on success. FALSE on failure. |
|---|---|
| PHP Version: | 4.0+ |