Funkce PHP getservbyport().
Příklad
Příklad getservbyport():
<?php
$intservname = getservbyport(80, "tcp");
echo $intservname;
?>
Definice a použití
Funkce getservbyport() vrací internetovou službu pro daný port a protokol.
Syntax
getservbyport(port, protocol)
Hodnoty parametrů
Parameter | Description |
---|---|
port | Required. Specifies the port number (like 80) |
protocol | Required. Specifies a protocol name (like "tcp" or "udp") |
Technické údaje
Návratová hodnota: | Název internetové služby při úspěchu |
---|---|
Verze PHP: | 4,0+ |
❮ PHP Network Reference