Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

DNS Validation

Tue Oct 28, 2008 2:06 pm

Code:
<html>
<head>
<title> hostname validator </title>
</head>
<body>
<?php
$hostname
= "www.codemiles.com";

if (!isset(
$hostname)) {
   die(
"Hostname value wasn't properly submitted. Retry.");
}
                           
if(empty(
$hostname)){
   die(
"Hostname field was left blank ! Retry.");
}
echo
"<b>". $hostname ."</b> ";
                           
if(
checkdnsrr($hostname)) {
    echo
"has a valid MX record !<br>";
}else{
    die(
"does not exist");
}
?>
</body>
</html>




Post a reply
  Related Posts  to : DNS Validation
 XML validation against DTD     -  
 US Zip Code Validation     -  
 What will be validation for Zip code ?     -  
 validation using JavaScript     -  
 validation on number     -  
 date validation in asp     -  
 Validation using Ajax     -  
 AJAX form validation     -  
 Form Validation Problem     -  
 Email validation in Javascript     -  

Topic Tags

PHP Networking