note 83064 added to function.getprotobyname

From: Date: Thu, 08 May 2008 15:33:43 +0000
Subject: note 83064 added to function.getprotobyname
Groups: php.notes 
Request: Send a blank email to php-notes+get-139183@lists.php.net to get a copy of this message
getprotobyname() ===================== getprotobyname() gives the protocol number for the given protocol name on the local system. If the protocol is not recognized, then the function returns -1. The given code snippet gives the list of protocols along with their protocol numbers <? $arr=array("ip","icmp","ggp","tcp", "egp","pup","udp","hmp","xns-idp", "rdp","rvd" ); //Reads the names of protocols into an array.. for($i=0;$i<11;$i++) { $proname=$arr[$i]; echo $proname .":", getprotobyname ($proname)."<br />"; } ?> ---- Server IP: 59.162.86.33 Probable Submitter: 122.166.40.225 ---- Manual Page -- http://www.php.net/manual/en/function.getprotobyname.php Edit -- https://master.php.net/note/edit/83064 Del: integrated -- https://master.php.net/note/delete/83064/integrated Del: useless -- https://master.php.net/note/delete/83064/useless Del: bad code -- https://master.php.net/note/delete/83064/bad+code Del: spam -- https://master.php.net/note/delete/83064/spam Del: non-english -- https://master.php.net/note/delete/83064/non-english Del: in docs -- https://master.php.net/note/delete/83064/in+docs Del: other reasons-- https://master.php.net/note/delete/83064 Reject -- https://master.php.net/note/reject/83064 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#139183) next »