Email validation error in PHP -


i have build form , and link emailvalidation.php send data on mail. facing error in php code on line 37. don't know error.

error: fatal error: call undefined function checkdnsrr() in g:\pleskvhosts\domain.com\httpdocs\php\functions\emailvalidation.php on line 37

php code:

<?php function validemail($emailaddress) {     $isvalid = true;     $atindex = strrpos($emailaddress, "@");     if (is_bool($atindex) && !$atindex) {         $isvalid = false;     } else {         $domain = substr($emailaddress, $atindex + 1);         $local = substr($emailaddress, 0, $atindex);         $locallen = strlen($local);         $domainlen = strlen($domain);         if ($locallen < 1 || $locallen > 64) {             // local part length exceeded             $isvalid = false;         } else if ($domainlen < 1 || $domainlen > 255) {             // domain part length exceeded             $isvalid = false;         } else if ($local[0] == '.' || $local[$locallen - 1] == '.') {             // local part starts or ends '.'             $isvalid = false;         } else if (preg_match('/\\.\\./', $local)) {             // local part has 2 consecutive dots             $isvalid = false;         } else if (!preg_match('/^[a-za-z0-9\\-\\.]+$/', $domain)) {             // character not valid in domain part             $isvalid = false;         } else if (preg_match('/\\.\\./', $domain)) {             // domain part has 2 consecutive dots             $isvalid = false;         } else if (!preg_match('/^(\\\\.|[a-za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/', str_replace("\\\\", "", $local))) {             // character not valid in local part unless             // local part quoted             if (!preg_match('/^"(\\\\"|[^"])+"$/', str_replace("\\\\", "", $local))) {                 $isvalid = false;             }         }         if ($isvalid && !(checkdnsrr($domain, "mx") || checkdnsrr($domain, "a"))) {             // domain not found in dns             $isvalid = false;         }     }     return $isvalid; } ?> 

you call this

checkdnsrr 

and function not supported in php version


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -