getprotobynumber 


Apache apg

GETS the protocol name associatede with the protocol number.





This function returns FALSE on failure.



<?php

str
|false getprotobynumber int $protocol )


where,

$protocol The protocol number
  
?>

  $protocol   


The protocol number.



  1 EXERCISE   

<table width="100%" cellspacing="3" cellpadding="3" 
border="1" align="center"><tbody><tr><td colspan="2">PROTOCOLS</td></tr>
<tr><td>NUMBER</td><td>NAME</td></tr>
<?php

for ($xs 1$xs <= 10000$xs++) { 
if(
getprotobynumber($xs))
{

?>
    </tr><td><?php echo $xs?></td>
    <td><?php echo getprotobynumber($xs); ?></td></tr>
    
<?php } } ?>
</tr><tr><td colspan="2">ed48</td></tr></tbody></table>