getservbyname: get server by name : DNS « Network « PHP






getservbyname: get server by name

<?php
   echo "HTTP's default port number is: ".getservbyname("http", "tcp");
?>


           
       








Related examples in the same category

1.getservbyport: get server by port
2.Check DNS error
3.Get MX records corresponding to a given Internet host name