• 20-07-2009, 22:35:04
    #1
    Üyeliği durduruldu
    merhabalar bazı sitelerde gördügümüz gibi mail adresinin spam'a düşmemesi için resim içinde gösterilir bizde bu şekilde göstermek istiyorsak aşagıdaki kod tam size göre

    <?php
    error_reporting(0);
    header("Content-type: image/png");
    $olustur = imagecreate(200, 20);
    $arkaplan = imagecolorallocate($olustur, 0xFF, 0xFF, 0xFF);
    $yazirengi = imagecolorallocate($olustur, 0, 0, 0);
    $id = $_GET["id"];
    if(is_numeric($id))
    {
    
    $mail_al = mysql_fetch_array(mysql_query("select email from uyeler where id='$id'"));
    imagestring($olustur, 2, 5, 3,  $mail_al["email"], $yazirengi);
    }else
    {
    imagestring($olustur, 2, 5, 3,  "mail adresi yok!", $yazirengi);
    }
    imagepng($olustur);
    imagedestroy($olustur);
    
    
    
    
    ?>
    mantık çok basit anlamayan yapamayan olursa konu altından sorabilir

    dogru çalışması için GD kütüphanesinin aktif olması gerekir.
  • 20-07-2009, 23:30:09
    #2
    Üyeliği durduruldu
    Güzel olmuş eline sağlık. Böylece mail botlarından yırtılabilinir =)
  • 22-07-2009, 11:40:25
    #3
    Üyeliği durduruldu
    evt benimde başıma geldigi için böyle bir uygulama yazdım paylaşayım dedim
  • 22-07-2009, 18:21:25
    #4
    font seçip yapabilirmisin? misal pixel font ile, örnek verirsen çok iyi olur...
  • 22-07-2009, 18:34:41
    #5
    Üyeliği durduruldu
    <?php
    header('Content-type: image/png');
    $resim = imagecreatetruecolor(400, 30);
    $beyaz = imagecolorallocate($resim, 255, 255, 255);
    $siyah = imagecolorallocate($resim, 0, 0, 0);
    imagefilledrectangle($resim, 0, 0, 399, 29, $beyaz);
    $metin = 'info@loverzsoft.com'; //yazı yeri
    $font = 'arial.ttf';//font yeri
    imagettftext($resim, 20, 0, 10, 20, $siyah, $font, $metin);
    imagepng($resim);
    imagedestroy($resim);
    ?>
  • 22-07-2009, 18:38:28
    #6
    LoverzSoft adlı üyeden alıntı: mesajı görüntüle
    <?php
    header('Content-type: image/png');
    $resim = imagecreatetruecolor(400, 30);
    $beyaz = imagecolorallocate($resim, 255, 255, 255);
    $siyah = imagecolorallocate($resim, 0, 0, 0);
    imagefilledrectangle($resim, 0, 0, 399, 29, $beyaz);
    $metin = 'info@loverzsoft.com'; //yazı yeri
    $font = 'arial.ttf';//font yeri
    imagettftext($resim, 20, 0, 10, 20, $siyah, $font, $metin);
    imagepng($resim);
    imagedestroy($resim);
    ?>
    sağolasın oldu.