Funkcja getservbyport() PHP
Przykład
Przykład getservbyport():
<?php
$intservname = getservbyport(80, "tcp");
echo $intservname;
?>
Definicja i użycie
Funkcja getservbyport() zwraca usługę internetową dla danego portu i protokołu.
Składnia
getservbyport(port, protocol)
Wartości parametrów
Parameter | Description |
---|---|
port | Required. Specifies the port number (like 80) |
protocol | Required. Specifies a protocol name (like "tcp" or "udp") |
Szczegóły techniczne
Wartość zwrotu: | Nazwa usługi internetowej po sukcesie |
---|---|
Wersja PHP: | 4.0+ |
❮ Informacje o sieci PHP