Jump to content


Hostname Resolver (PHP)


Dr.Paneas

Recommended Posts

Παιζοντας λοιπον, εφτιαξα ενα προγραμματάκι για να αποφεύγω το nslookup των windows.


<?php
$ip = gethostbyname($host);

echo "<form action='ip.php' method='POST'>\n
<input type='text' name='host'>\n
<input type='submit' value='Resolve'>\n
</form>\n";

if ($ip != $host)
echo "The IP address for <i>$host</i> is <i>$ip</i>.";
else
echo "Please enter a valid hostname or domain name<i>$host</i>.";
?>

Μπορειτε να το τεστάρετε από εδώ :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.