[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 Name Port Number Protocol
‘.strtoupper($service).’ ‘.$port.’ TCP/UDP

“;
[/insert_php]