Obtenir les ports par défaut liés à un protocole ou service internet

Author:


Download

<html>
<head>
<title>Port Protocole</title>
</head>
<body>
<?php

   $protocol=array("http", "ftp", "https");
   foreach($protocol as $elem)
   {
       echo "Port par défaut de <b>$elem</b>:".getservbyname($elem, "tcp")."<br/>";
   }

?>
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *


+ eight = 9