Php Email Verification Script

Address verifier script allows you to verify users email address using php.

Features

  • Email verification script allows you to verify users email during registration.
  • This script uses to find out the email is valid or not.
  • Address verifier allows you to avoid spam emails.
  • Scripts supports in all modern browsers.
  • It is responsive and user interface.

Preview

Email Address Verifier


Enter email to verify :   
©h

Note :We cannot provide the demo version of the script. As If you use the preview of the script frequently, our IP will be blocked. To verify your email address, kindly download and use the script.

Downloads


<?php
error_reporting(0);
function verify_email($email){
$result=false;
if(!preg_match('/^[_A-z0-9-]+((\.|\+)[_A-z0-9-]+)*@[A-z0-9-]+(\.[A-z0-9-]+)*(\.[A-z]{2,4})$/',$email))
return $result;
list($name, $domain)=explode('@',$email);
if(!checkdnsrr($domain,'MX'))
return $result;
$max_conn_time = 30;
$fp='';
$port = 25;
$max_read_time = 5;
$users=$name;
$hosts = array();
$mxweights = array();
getmxrr($domain, $hosts, $mxweights);
$mxs = array_combine($hosts, $mxweights);
asort($mxs, SORT_NUMERIC);

$mxs[$domain] = 100;
$timeout = $max_conn_time / count($mxs);

while(list($host) = each($mxs)) {
#connect to SMTP server
if($fp = fsockopen($host, $port, $errno, $errstr, (float) $timeout)){
stream_set_timeout($fp, $max_read_time);
break;
}
}
if($fp) {
$reply = fread($fp, 2082);
preg_match('/^([0-9]{3}) /ims', $reply, $matches);
$code = isset($matches[1]) ? $matches[1] : '';
if($code != '220') {
return $result;
}
$msg="HELO ".$domain;
fwrite($fp, $msg."\r\n");
$reply = fread($fp, 2082);

$msg="MAIL FROM: <".$name.'@'.$domain.">";
fwrite($fp, $msg."\r\n");
$reply = fread($fp, 2082);

$msg="RCPT TO: <".$name.'@'.$domain.">";
fwrite($fp, $msg."\r\n");
$reply = fread($fp, 2082);

preg_match('/^([0-9]{3}) /ims', $reply, $matches);
$code = isset($matches[1]) ? $matches[1] : '';

if($code == '250') {
$result=true;
}elseif($code == '451' || $code == '452') {
$result=true;
}else{
$result=false;
}
$msg="quit";
fwrite($fp, $msg."\r\n");
fclose($fp);
}
return $result;
}
$email = "xxx@gmail.com";
if(verify_email($email))
echo "<div align='center'><b><font style='color:green;'>Email Verified Successfully!!!</font></b></div>";
else
echo "<div align='center'><b><font style='color:red;'>Invalid Email Address</font></b></div>";
?>
  • Release Date - 31-08-2015
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to support@hscripts.com

Usage

  • Copy and paste the above code to run the script.
  • Give email address in the php variable "$email".
  • And verify that email address through "verify_email($email) function".
  • Php email verification helps to connect email to SMTP server and fetch the header information whether the given email is exists or not.

License

Related Scripts

Free Php Scripts


Ask Questions

Ask Question