Re: [Linux-programlama] [PHP - gercek email adresi kontrolu]

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: bunyamin (blacknightro@gmail.com)
Date: Fri 15 Jul 2005 - 12:05:59 EEST


ilginiz icn cok tesekkur ederim

bunlari kullanicam...

fakat mail adresini kontrol eden bi kod, bir fonksiyon bulabilirseniz
cok iyi olur

ben cok aradim bulamadim :)

On 7/15/05, hakan@soulmaster.org <hakan@soulmaster.org> wrote:
> Merhaba,
> duzenli ifade ile hazirlanan kontrolden sonra
>
> if (checkdnsrr($alan_adi, 'A') && checkdnsrr($alan_adi, 'MX')) {
> }
> else {
> }
>
> gibi bir kontrol yapisi da kullanilabilir.
>
>
> --
> Hakan POLATKAN
> --
>
>
> Quoting Devrim GUNDUZ <devrim@gunduz.org>:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> >
> > Merhaba,
> >
> > On Tue, 12 Jul 2005, bunyamin wrote:
> >
> > > bir e-mail adersinin gercek olup olmadigini anlayan bi fonksiyona
> > > ihtiyacým var...
> > >
> > > boyle bi kod varmi??
> > >
> > > kisi e-mail adresini yazýnca boyle bir e-mail adresi gercekten varmi
> > > yokmu kontrol etmeli...
> >
> > Bu biraz zor; ama en azýndan alan adýný vs kontrol eden birþey ararsanýz
> > þunu kullanabilirsiniz. Bunu PostgreSQL.org'da kullanýyoruz biz:
> >
> > =============================================
> > function verify_email($Address)
> > {
> > /* Check the email address structure
> > // Returns 0 if the email is correctly structured and has a valid MX
> > record
> > // Returns 1 if incorrectly structured (i.e. invalid and could never
> > work)
> > Returns 2 if it seems alright but there is no valid dns entry
> > */
> > if
> >
> (eregi("^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~])+@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~]+\\.)+[a-zA-Z]{2,4}\$",
> > $Address) == 0)
> > {
> > return 1;
> > }
> >
> > // Get the user/domain
> > $User = strtok($Address,"@");
> > $Domain = strtok("") . ".";
> >
> > $ // Check for the domain MX records
> > if (getmxrr($Domain, $Servers)) {
> > return 0;
> > }
> >
> > $ // No MX record, so maybe it's a host
> > if (gethostbyname($Domain) == $Domain) {
> > return 2;
> > } else {
> > return 0;
> > }
> > }
> > =======================================================
> >
> > Bunu da þu þekilde kullanacaksýnýz:
> >
> > $emailret = verify_email(rawurldecode($e_posta_adresi));
> > if ($emailret != 0)
> > {
> > // E-posta adresi gecersiz
> > ...
> > exit();
> > }
> >
> >
> > Saygýlar,
> >
> > - --
> > Devrim GUNDUZ
> > devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
> > http://www.tdmsoft.com.tr http://www.gunduz.org
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.1 (GNU/Linux)
> >
> > iD8DBQFC1vODtl86P3SPfQ4RAonyAKCMTfJOLoLq8gtIJItaLvrOttqzTgCgosW/
> > SL9KN2mRktMAyLIaKCpPNgE=
> > =K2Jj
> > -----END PGP SIGNATURE-----
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.