[insert_php]
echo “

Services by Port Number

“;
$services = array(‘http’, ‘ftp’, ‘ssh’, ‘telnet’, ‘imap’,’smtp’, ‘nicname’, ‘gopher’, ‘finger’, ‘pop3’, ‘www’);

echo “

“;
foreach ($services as $service) {
$port = getservbyname($service, ‘udp’);
//echo $service . “: ” . $port . “
\n”;
echo ‘

‘;
}
echo “

Service NamePort NumberProtocol
‘.strtoupper($service).’‘.$port.’TCP/UDP

“;
[/insert_php]