Mega Code Archive

 
Categories / Php / Code Snippets
 

Getservbyport function returns the name of the service that uses a specified port

<?php $service = getservbyport(80, "tcp"); print("Port 80 is $service<br>\n"); ?>