Loading:


    PHP Ochrona adresu e-mail z użyciem pliku graficznego

    Skrypt PHP chroni adres e-mail przed spamem poprzez tworzenie obrazka z adresem.



    Napisz Artyku³

    Listing


    // adres e-mail w postaci obrazka

    <?PHP

    function antyspam($text, $font, $size)
    {
      $arr = imagettfbbox($size, 0, $font, $text);
      $width = abs($arr[2] - $arr[0]) + 5;
      $height = abs($arr[1] - $arr[7]) + 1;
      $img = imagecreatetruecolor($width, $height);
      $white = imagecolorallocate($img, 255, 255, 255);
      $black = imagecolorallocate($img, 0, 0, 0);

      imagefill($img, 0, 0, $white);
      imagettftext($img, $size, 0, 0, $height - 5, $black, $font, $text);

      imagepng($img, "email.png");
      imagedestroy($img);
      echo("<IMG ALIGN=\"absbottom\" SRC=\"email.png\">");
    }
    ?>

    <HTML>
    <HEAD></HEAD>
    <BODY>
    <FONT FACE="Arial">Mój email to:</FONT>
    <?PHP antyspam("nazwa.uzytkownika@nazwa.domeny", "arial.ttf", 11); ?>
    </BODY>
    </HTML>
     




    Dodano przez: igor
    Ranga: Administrator serwisu Punktów: 0
    Komentarze użytkowników
      • Tre¶æ komentarza
        Kod do komentarza (opcjonalnie)
        PHP JavaScript MySQL Smarty SQL HTML CSS ActionScript
        Autor
        Token
        token

         

         








    funkcje.net
    Wszelkie prawa zastrzeżone©. | Funkcje.net 2008-2025 v.1.5 | design: diviXdesign & rainbowcolors