[SOLVED] Using checkdnsrr() for MX record
Posted: Sun Oct 15, 2006 1:58 am
I'm just starting something very basic to test a few things. Here is my code:
No matter what I try, it returns false and says "You can purchase this domain". Is there something I am doing wrong? All of the other examples I've seen do this.
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>