• 27-07-2010, 16:35:35
    #1
    [a-z,A-Z,0-9,.,-,_]@[a-z,A-Z,0-9,.,-,_].[a-z]

    Ziyaretçi defteri, üyelik sistemi scriptlerinde kullanıcının doğru mail adresi girip girmediğini yukarıdaki gibi bir sistem ile kontrol ediyorduk.

    if döngüsüyle nasıl böyle bir kontrol yapabilirim, kodun aslı nasıldı?
  • 27-07-2010, 17:06:42
    #3
    function email_kontrol ($adres) { 
    return 
    (ereg("^[-!#$%&'*+\./0-9=?A-Z^_`a-z{|}~]+"."@". "[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+."."[-!#$%&'*+\./0-9=?A-Z^_`a-z{|}~]+$", 
    $adres)); 
    }
    
    
    if( email_kontrol($emaill)){
    echo"Geçerli Adres";
    }
    else{echo"Geçersiz Adres";
    }
  • 27-07-2010, 17:17:40
    #4
    if(filter_var($mail, FILTER_VALIDATE_EMAIL))
    {
    //Mail Geçerli
    }
    else
    {
    //Mail Geçerli Değil
    }
  • 27-07-2010, 17:19:54
    #5
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Gençllerr, gençler. REGEX'le e-posta kontrolümü yapılır yahu?

    // Quote: SMF; [SiNaN]
    function domain_exists($email, $record = 'MX')
    {
    	list($user, $domain) = split('@', $email);
    
    	$function = (function_exists('checkdnsrr') ? '' : 'smf_') . 'checkdnsrr';
    
    	return $function($domain, $record);
    }
    
    function smf_checkdnsrr($host, $type = '')
    {
    	if (!empty($host))
    	{
    		if ($type == '')
    			$type = "MX";
    
    		exec("nslookup -type=$type $host", $result);
    		foreach ($result as $line)
    		{
    			if (preg_match('~^' . preg_quote($host) . '~i', $line))
    				return true;
    		}
    		return false;
    	}
    	return false;
    }
    
    // Örnek: domain_exists('ali@ata.bak')
  • 27-07-2010, 17:26:18
    #6
    by_grafitus adlı üyeden alıntı: mesajı görüntüle
    Gençllerr, gençler. REGEX'le e-posta kontrolümü yapılır yahu?

    // Quote: SMF; [SiNaN]
    function domain_exists($email, $record = 'MX')
    {
        list($user, $domain) = split('@', $email);
    
        $function = (function_exists('checkdnsrr') ? '' : 'smf_') . 'checkdnsrr';
    
        return $function($domain, $record);
    }
    
    function smf_checkdnsrr($host, $type = '')
    {
        if (!empty($host))
        {
            if ($type == '')
                $type = "MX";
    
            exec("nslookup -type=$type $host", $result);
            foreach ($result as $line)
            {
                if (preg_match('~^' . preg_quote($host) . '~i', $line))
                    return true;
            }
            return false;
        }
        return false;
    }
    
    // Örnek: domain_exists('ali@ata.bak')
    kim yaptı ?



    buda bir örnek
    https://www.r10.net/1060906078-post63.html
  • 27-07-2010, 18:01:57
    #7
    by_grafitus hacım senin taktik hakkatten sağlammış tuttum bunu
  • 27-07-2010, 23:05:07
    #8
    by_grafitus adlı üyeden alıntı: mesajı görüntüle
    Gençllerr, gençler. REGEX'le e-posta kontrolümü yapılır yahu?

    // Quote: SMF; [SiNaN]
    function domain_exists($email, $record = 'MX')
    {
        list($user, $domain) = split('@', $email);
    
        $function = (function_exists('checkdnsrr') ? '' : 'smf_') . 'checkdnsrr';
    
        return $function($domain, $record);
    }
    
    function smf_checkdnsrr($host, $type = '')
    {
        if (!empty($host))
        {
            if ($type == '')
                $type = "MX";
    
            exec("nslookup -type=$type $host", $result);
            foreach ($result as $line)
            {
                if (preg_match('~^' . preg_quote($host) . '~i', $line))
                    return true;
            }
            return false;
        }
        return false;
    }
    
    // Örnek: domain_exists('ali@ata.bak')
    Birkaç açıklama satırı yazabilir misiniz?
    Bu kod beni biraz aştı.
    Diğer arkadaşlarınkini anladım, ancak bunu anlayamadım.
    Mx record olayı burada neyi ifade ediyor?