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: Nilgün Belma Bugüner (nilgun@belgeler.gen.tr)
Date: Fri 15 Jul 2005 - 16:00:41 EEST


Cum 15 Tem 2005 12:05 sularında, bunyamin şunları yazmıştı:
> ilginiz icn cok tesekkur ederim
>
> bunlari kullanicam...
>
> fakat mail adresini kontrol eden bi kod, bir fonksiyon bulabilirseniz
> cok iyi olur
>
> ben cok aradim bulamadim :)
Selam,

Bir zamanlar böyle bir işlev yazmıştım. Amacı eposta adresi sınamak
değil, bir metin içinden eposta adresini bulup biçimleyip yazmaktı.
İşinize yararsa amacınıza uygun olarak özelleştirebilirsiniz:
-----------
  function getURL($temp) {
        /* eposta adresleri */
    $arg = preg_replace ("/\\\f\w/", " ", $temp);
    $regex = "/([(\w|\.|\-|\_|\\\)]+)(@([(\w|\.|\-|\_)]+)[^(\.|\s)]*\.)([(\w|\-|\_)]+)/";
    if (preg_match_all($regex, $arg, $matches, PREG_SET_ORDER)):
      foreach($matches as $match) {
        if(!empty($match[3])):
          $arg = $match[0];
          $arg = preg_replace ("/(<|\(|\)|>)/", "", $arg);
          $i = strpos($temp, $arg);
          $link = "<email>" . $arg . "</email>";
          $temp = substr_replace($temp, $link, $i, strlen($arg));
        endif;
      }
    endif;
  }
----------------------------

Esen kalın,
Nilgün

_______________________________________________
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.