Source for file email_validation.php
Documentation is available at email_validation.php
* @(#) $Header: /srv/cvs/framework/09-Implementacao/terceiros/email_validation.php,v 1.1 2007/01/15 12:56:58 mmerlone Exp $
Function Tokenize($string,$separator=
"")
for($character=
0;$character<
strlen($separator);$character++
)
if(GetType($position=
strpos($string,$separator[$character]))==
"integer")
$found=
(IsSet
($found) ?
min($found,$position) :
$position);
return(substr($string,0,$found));
$message=
str_replace("\n","<br />\n",HtmlEntities($message));
$line.=
fgets($connection,100);
&&
substr($line,$length-
2,2)==
"\r\n")
$line=
substr($line,0,$length-
2);
Function PutLine($connection,$line)
return(fputs($connection,"$line\r\n"));
&&
$getmxrr($domain,$hosts,$weights))
for($host=
0;$host<
count($hosts);$host++
)
$mxhosts[$weights[$host]]=
$hosts[$host];
for(Reset($mxhosts),$host=
0;$host<
count($mxhosts);Next($mxhosts),$host++
)
$hosts[$host]=
$mxhosts[Key($mxhosts)];
return(count($hosts)!=
0);
while(($line=
$this->GetLine($connection)))
for($host=
0;$host<
count($hosts);$host++
)
if(ereg('^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$',$domain))
$this->OutputDebug("Resolving host name \"".
$hosts[$host].
"\"...");
$this->OutputDebug("Could not resolve host name \"".
$hosts[$host].
"\".");
$this->OutputDebug("Host address of \"".
$hosts[$host].
"\" is the exclude address");
$this->OutputDebug("Connecting to host address \"".
$ip.
"\"...");
&&
$this->PutLine($connection,"HELO $localhost")
&&
$this->PutLine($connection,"MAIL FROM: <$localuser@$localhost>")
&&
$this->PutLine($connection,"RCPT TO: <$email>")
if($this->PutLine($connection,"DATA"))
$this->OutputDebug("This host states that the address is ".
($result ?
($result>
0 ?
"valid" :
"undetermined") :
"not valid").
".");
$this->OutputDebug("Unable to validate the address with this host.");
Documentation generated on Sun, 09 Mar 2008 23:51:42 -0300 by phpDocumentor 1.4.0