وظيفة PHP getservbyport ()
مثال
مثال على getservbyport ():
<?php
$intservname = getservbyport(80, "tcp");
echo $intservname;
?>
التعريف والاستخدام
ترجع الدالة getservbyport () خدمة الإنترنت لمنفذ وبروتوكول محددين.
بناء الجملة
getservbyport(port, protocol)
قيمه المعامل
Parameter | Description |
---|---|
port | Required. Specifies the port number (like 80) |
protocol | Required. Specifies a protocol name (like "tcp" or "udp") |
تفاصيل تقنية
قيمة الإرجاع: | اسم خدمة الإنترنت على النجاح |
---|---|
إصدار PHP: | 4.0+ |
❮ مرجع شبكة PHP