PHP getservbyname() İşlevi
Örnek
Bir getservbyname() örneği:
<?php
$portnum = getservbyname("http", "tcp");
echo $portnum;
?>
Tanım ve Kullanım
getservbyname() işlevi, belirli bir İnternet hizmeti ve protokolü için bağlantı noktası numarasını döndürür.
Sözdizimi
getservbyname(service, protocol)
Parametre Değerleri
Parameter | Description |
---|---|
service | Required. Specifies the Internet service name (like "http") |
protocol | Required. Specifies a protocol name (like "tcp" or "udp") |
Teknik detaylar
Geri dönüş değeri: | Başarı durumunda bağlantı noktası numarası. Başarısızlıkta YANLIŞ |
---|---|
PHP Sürümü: | 4.0+ |
❮ PHP Ağ Referansı