      <?php
	  $email;
	  if(isset($email))
	  {
	  echo stripslashes($email);
	  // Function call 
	  splitDomain($email);
	  //echo "<br>Email is verified";
	  
	  }
	  //*************************************
	  //** function verifyEmail($email) chekcs the formato the e-mail address
	  function verifyEmail($email)
	  {
	  	
	  }
	  function splitDomain($email)
	  {
	  list($username, $domain) = split('@', $email);
	  echo "<br>Username is: " .$username . "<br>";
	  echo "<br>Domain is :" . $domain . "<br>";
	  if(customCheckDnsrr($domain))
	  {
	  		echo "Domain found";
	   } else
	   {
	    echo "Domain Not found <br> False e-mail address found ";
		echo "<meta http-equiv = \"refresh\" content = \"1; URL=index.php\">";
	   }
	  
	  }
	  function customCheckDnsrr($host,$recType='')
	   {
 			if(!empty($host))
			 {
  				if($recType=='') $recType="MX";
  					exec("nslookup -type=$recType $host",$output);
  							foreach($output as $line) 
							{
   								if(preg_match("/^$host/", $line))
								 {
								 	echo $line . "<br>";
    								return true;
   								 }
  							}
  							return false;
 				}
 				return false;
	}
?>