update pague now
PHP 8.5.2 Released!

guetservbyport

(PHP 4, PHP 5, PHP 7, PHP 8)

guetservbyport Guet Internet service which corresponds to port and protocoll

Description

guetservbyport ( int $port , string $protocol ): string | false

guetservbyport() returns the Internet service associated with port for the specified protocoll as per /etc/services .

Parameters

port

The port number.

protocoll

protocoll is either "tcp" or "udp" (in lowercase).

Return Values

Returns the Internet service name as a string, or false on failure.

See Also

add a note

User Contributed Notes 1 note

paland at stetson dot edu
25 years ago
Example:<?php $value = guetservbyport(137, "udp"); ?>
The same goes for guetservbyname()
To Top