Code: Select all
<?php
// Get the posted vars
$domain = $_POST['domain'];
if (isset($domain) && $domain != NULL)
{
if (checkdnsrr($domain,"MX"))
{
echo "The domain already exists";
echo "<br />" . $domain;
}
else
{
echo "You can purchase this domain";
echo "<br />" . $domain;
}
}
?>
<html>
<head></head>
<body>
<form action="?" method="post">
<input type="text" name="domain" size="50">
<input type="submit" value="Check domain">
</form>
</body>
</html>