Question:How do you retrive internet service port number in php? 

Answer The getservbyname() function returns the port number of a specified service.

Prototype:

int getservbyname(string service, string protocol)

Example:

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

?> 


Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in D:\webserver\www\vcampusbd_com_https\answers\column_answer_two.php on line 128
+ Report
Total Preview: 890
How do you retrive internet service port number in php?
Copyright © 2024. Powered by Intellect Software Ltd