close
<?php
$services = array('http', 'ftp', 'ssh', 'telnet', 'imap',
'smtp', 'nicname', 'gopher', 'finger', 'pop3', 'www');
foreach ($services as $service) {
$port = getservbyname($service, 'tcp');
echo $service . ": " . $port . "<br />\n";
}
?>
輸出:
http: 80
ftp: 21
ssh: 22
telnet: 23
imap: 143
smtp: 25
nicname: 43
gopher: 70
finger: 79
pop3: 110
www: 80
全站熱搜
留言列表