<?PHP
FUNCTION check_email($email){
IF(@EREG("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email)){
$url = SUBSTR(STRRCHR($email, "@"), 1);
IF (STRSTR($url, "/")) {
$url = EXPLODE("/", $url, 2);
$url[1] = "/".$url[1];
} ELSE {
$url = ARRAY($url, "/");
}
$fh = @FSOCKOPEN($url[0], 80);
IF ($fh) {
@FPUTS($fh,"GET ".$url[1]." HTTP/1.1\nHost:".$url[0]."\n\n");
IF (@FREAD($fh, 22) == "HTTP/1.1 404 Not Found") { RETURN FALSE; }
ELSE { RETURN TRUE; }
} ELSE { RETURN FALSE;}
}ELSE{
RETURN FALSE;
}
}
?>