note 10760 deleted from function.gethostbyaddr by jimw

From: Date: Fri, 14 Dec 2001 21:14:30 +0000
Subject: note 10760 deleted from function.gethostbyaddr by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22813@lists.php.net to get a copy of this message
Here is an easy way to resolve large amounts of hosts aka Mass Resolving. First I used nslookup with passthru etc. gethostbyaddr seemed to work a lot easier :) &lt;?php print "<HTML>\n<HEAD></HEAD>\n<BODY>\n<FONT Face='verdana'>\n<TABLE>\n"; print "<TR><TD WIDTH='120'>IP Address</TD><TD>Hostname</TD></TR>"; $loop=0; while($loop != 5) { print "<TR><TD>$resolvip</TD>" . "<TD>" . gethostbyaddr($resolvip) . "</TD></TR>"; $loop++; $resolvip =$ip . "." . $loop; } print "</TABLE>\n</FONT>\n</BODY>\n</HTML>\n"; ?>

« previous php.notes (#22813) next »