Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/07/2008, 11:28
Avatar de T4ke0veR
T4ke0veR
 
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 19 años, 1 mes
Puntos: 28
Respuesta: Como comprobar una direccion de correo con php?

mmmm no estoy seguro pero ve estas dos funciones
Código PHP:
<?php function check_email($email) {
        if(
preg_match('/^\w[-.\w]*@(\w[-._\w]*\.[a-zA-Z]{2,}.*)$/', $email, $matches))
        {
            if(
function_exists('checkdnsrr'))
            {
                if(
checkdnsrr($matches[1] . '.', 'MX')) return true;
                if(
checkdnsrr($matches[1] . '.', 'A')) return true;
            }else{
                if(!empty(
$hostName))
                {
                    if( 
$recType == '' ) $recType = "MX";
                    
exec("nslookup -type=$recType $hostName", $result);
                    foreach (
$result as $line)
                    {
                        if(
eregi("^$hostName",$line))
                        {
                            return 
true;
                        }
                    }
                    return 
false;
                }
                return 
false;
            }
        }
        return 
false;
    }
?>
Código PHP:
<?php

if(!function_exists('checkdnsrr'))
{
    function 
checkdnsrr($hostName, $recType = '') 
    { 
     if(!empty(
$hostName)) { 
       if( 
$recType == '' ) $recType = "MX"; 
       
exec("nslookup -type=$recType $hostName", $result); 
        
       foreach (
$result as $line) { 
         if(
eregi("^$hostName",$line)) { 
           return 
true; 
         } 
       } 
    return 
false; 
     } 
     return 
false;
    }
} 
?>
__________________
Diseño gráfico, Web, imagen corporativa, publicidad ...