A getservbyport() example:
<?php
$intservname = getservbyport(80, "tcp");
echo $intservname;
?>
The getservbyport() function returns the Internet service for a given port and protocol.
getservbyport(
port, protocol)
Parameter | Description |
---|---|
port | Required. Specifies the port number (like 80) |
protocol | Required. Specifies a protocol name (like "tcp" or "udp") |
Return Value: | The Internet Service name on success |
---|---|
PHP Version: | 4.0+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!