|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-11-01 19:59 UTC] evan at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Jun 19 22:00:02 2026 UTC |
There already are gethostbyaddr() and gethostbyname() ... But where are the functions mentioned in the subject. Do I have to parse /etc/services to do that..? How about: SYNOPSIS mixed getservicebyname(string name) string getservicebyport(int port) DESCRIPTION getservicebyname("ftp") would return "21" getservicebyport(80) would return "www" Of course, when local /etc/services file has a mapping for it, otherwise it should return values like e.g. gethostbyaddr(..) getservicebyport(123456) would return "123456", when not defined in /etc/services just my two cents Christian