Show w-mail address as an Image

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carlos Marangon

    Show w-mail address as an Image

    Hello!

    I have a guestbook and intend to show the e-mail adress of postes,
    but to avoid span the e-mail must be shown as a png image.
    The e-mail is called from a database, and must be converted to an image.
    How can i do it?


    Best regards,

    carlos
  • Virgil Green

    #2
    Re: Show w-mail address as an Image

    "Carlos Marangon" <area48@hotmail .com> wrote in message
    news:2cfc228.04 01281116.438ec2 97@posting.goog le.com...[color=blue]
    > Hello!
    >
    > I have a guestbook and intend to show the e-mail adress of postes,
    > but to avoid span the e-mail must be shown as a png image.
    > The e-mail is called from a database, and must be converted to an image.
    > How can i do it?[/color]

    Not looking at manuals right now... but look at imagestring()



    Comment

    • CountScubula

      #3
      Re: Show w-mail address as an Image

      "Carlos Marangon" <area48@hotmail .com> wrote in message
      news:2cfc228.04 01281116.438ec2 97@posting.goog le.com...[color=blue]
      > Hello!
      >
      > I have a guestbook and intend to show the e-mail adress of postes,
      > but to avoid span the e-mail must be shown as a png image.
      > The e-mail is called from a database, and must be converted to an image.
      > How can i do it?
      >
      >
      > Best regards,
      >
      > carlos[/color]

      in source page: (the base64 keeps the addy from being seen in the img call
      <IMG SRC="showemail. php?e=<?php print base64_encode($ addy); ?>" BORDER=0>


      the showemail.php:
      <?php
      $addy = base64_decode($ _GET['e']);
      $fnt = 4; // 1 to 5 I believe
      $sw = imagefontwidth( $fnt) * strlen($addy);
      $y = 9;
      if ($fnt > 1) {$y = 14;};
      if ($fnt > 3) {$y = 17;};
      $im = imagecreate($sw ,$y);
      $black = imagecoloralloc ate($im, 0, 0, 0);
      $white = imagecoloralloc ate($im, 255, 255, 255);
      imagefill($im,0 ,0,$white);
      imagestring($im ,$fnt,0,0,$addy ,$black);
      imagejpeg($im);
      exit();
      ?>

      make sure no space, or blank line before first <?php tag

      --
      Mike Bradley
      http://www.gzentools.com -- free online php tools


      Comment

      • CountScubula

        #4
        Re: Show w-mail address as an Image

        oops, I forgot about imagefontheight (), I copied code from my gzImage script
        for this post, so forgive me if its not to streamlined

        --
        Mike Bradley
        http://www.gzentools.com -- free online php tools
        "CountScubu la" <me@scantek.hot mail.com> wrote in message
        news:2gURb.1716 7$Sf4.4282@news svr27.news.prod igy.com...[color=blue]
        > "Carlos Marangon" <area48@hotmail .com> wrote in message
        > news:2cfc228.04 01281116.438ec2 97@posting.goog le.com...[color=green]
        > > Hello!
        > >
        > > I have a guestbook and intend to show the e-mail adress of postes,
        > > but to avoid span the e-mail must be shown as a png image.
        > > The e-mail is called from a database, and must be converted to an image.
        > > How can i do it?
        > >
        > >
        > > Best regards,
        > >
        > > carlos[/color]
        >
        > in source page: (the base64 keeps the addy from being seen in the img call
        > <IMG SRC="showemail. php?e=<?php print base64_encode($ addy); ?>" BORDER=0>
        >
        >
        > the showemail.php:
        > <?php
        > $addy = base64_decode($ _GET['e']);
        > $fnt = 4; // 1 to 5 I believe
        > $sw = imagefontwidth( $fnt) * strlen($addy);
        > $y = 9;
        > if ($fnt > 1) {$y = 14;};
        > if ($fnt > 3) {$y = 17;};
        > $im = imagecreate($sw ,$y);
        > $black = imagecoloralloc ate($im, 0, 0, 0);
        > $white = imagecoloralloc ate($im, 255, 255, 255);
        > imagefill($im,0 ,0,$white);
        > imagestring($im ,$fnt,0,0,$addy ,$black);
        > imagejpeg($im);
        > exit();
        > ?>
        >
        > make sure no space, or blank line before first <?php tag
        >
        > --
        > Mike Bradley
        > http://www.gzentools.com -- free online php tools
        >
        >[/color]


        Comment

        • Carlos Marangon

          #5
          Re: Show w-mail address as an Image

          Hello!

          I try run it in my PC and my Apache crashes when execute it.

          Maybe you would try it in an account of mine,
          in a server where I have an old page stored and I am no longer using it,
          due of problems in the server, but I have more 2 months paid.
          If you wish I give you the password and login.

          Sincerely,

          Carlos

          "CountScubu la" <me@scantek.hot mail.com> wrote in message news:<LjURb.171 68$Oh4.7350@new ssvr27.news.pro digy.com>...[color=blue]
          > oops, I forgot about imagefontheight (), I copied code from my gzImage script
          > for this post, so forgive me if its not to streamlined
          >
          > --
          > Mike Bradley
          > http://www.gzentools.com -- free online php tools
          > "CountScubu la" <me@scantek.hot mail.com> wrote in message
          > news:2gURb.1716 7$Sf4.4282@news svr27.news.prod igy.com...[color=green]
          > > "Carlos Marangon" <area48@hotmail .com> wrote in message
          > > news:2cfc228.04 01281116.438ec2 97@posting.goog le.com...[color=darkred]
          > > > Hello!
          > > >
          > > > I have a guestbook and intend to show the e-mail adress of postes,
          > > > but to avoid span the e-mail must be shown as a png image.
          > > > The e-mail is called from a database, and must be converted to an image.
          > > > How can i do it?
          > > >
          > > >
          > > > Best regards,
          > > >
          > > > carlos[/color]
          > >
          > > in source page: (the base64 keeps the addy from being seen in the img call
          > > <IMG SRC="showemail. php?e=<?php print base64_encode($ addy); ?>" BORDER=0>
          > >
          > >
          > > the showemail.php:
          > > <?php
          > > $addy = base64_decode($ _GET['e']);
          > > $fnt = 4; // 1 to 5 I believe
          > > $sw = imagefontwidth( $fnt) * strlen($addy);
          > > $y = 9;
          > > if ($fnt > 1) {$y = 14;};
          > > if ($fnt > 3) {$y = 17;};
          > > $im = imagecreate($sw ,$y);
          > > $black = imagecoloralloc ate($im, 0, 0, 0);
          > > $white = imagecoloralloc ate($im, 255, 255, 255);
          > > imagefill($im,0 ,0,$white);
          > > imagestring($im ,$fnt,0,0,$addy ,$black);
          > > imagejpeg($im);
          > > exit();
          > > ?>
          > >
          > > make sure no space, or blank line before first <?php tag
          > >
          > > --
          > > Mike Bradley
          > > http://www.gzentools.com -- free online php tools
          > >
          > >[/color][/color]

          Comment

          • CountScubula

            #6
            Re: Show w-mail address as an Image

            if u want me to, my email address is here:



            --
            Mike Bradley
            http://www.gzentools.com -- free online php tools
            "Carlos Marangon" <area48@hotmail .com> wrote in message
            news:2cfc228.04 01281853.48005e fe@posting.goog le.com...[color=blue]
            > Hello!
            >
            > I try run it in my PC and my Apache crashes when execute it.
            >
            > Maybe you would try it in an account of mine,
            > in a server where I have an old page stored and I am no longer using it,
            > due of problems in the server, but I have more 2 months paid.
            > If you wish I give you the password and login.
            >
            > Sincerely,
            >
            > Carlos
            >
            > "CountScubu la" <me@scantek.hot mail.com> wrote in message[/color]
            news:<LjURb.171 68$Oh4.7350@new ssvr27.news.pro digy.com>...[color=blue][color=green]
            > > oops, I forgot about imagefontheight (), I copied code from my gzImage[/color][/color]
            script[color=blue][color=green]
            > > for this post, so forgive me if its not to streamlined
            > >
            > > --
            > > Mike Bradley
            > > http://www.gzentools.com -- free online php tools
            > > "CountScubu la" <me@scantek.hot mail.com> wrote in message
            > > news:2gURb.1716 7$Sf4.4282@news svr27.news.prod igy.com...[color=darkred]
            > > > "Carlos Marangon" <area48@hotmail .com> wrote in message
            > > > news:2cfc228.04 01281116.438ec2 97@posting.goog le.com...
            > > > > Hello!
            > > > >
            > > > > I have a guestbook and intend to show the e-mail adress of postes,
            > > > > but to avoid span the e-mail must be shown as a png image.
            > > > > The e-mail is called from a database, and must be converted to an[/color][/color][/color]
            image.[color=blue][color=green][color=darkred]
            > > > > How can i do it?
            > > > >
            > > > >
            > > > > Best regards,
            > > > >
            > > > > carlos
            > > >
            > > > in source page: (the base64 keeps the addy from being seen in the img[/color][/color][/color]
            call[color=blue][color=green][color=darkred]
            > > > <IMG SRC="showemail. php?e=<?php print base64_encode($ addy); ?>"[/color][/color][/color]
            BORDER=0>[color=blue][color=green][color=darkred]
            > > >
            > > >
            > > > the showemail.php:
            > > > <?php
            > > > $addy = base64_decode($ _GET['e']);
            > > > $fnt = 4; // 1 to 5 I believe
            > > > $sw = imagefontwidth( $fnt) * strlen($addy);
            > > > $y = 9;
            > > > if ($fnt > 1) {$y = 14;};
            > > > if ($fnt > 3) {$y = 17;};
            > > > $im = imagecreate($sw ,$y);
            > > > $black = imagecoloralloc ate($im, 0, 0, 0);
            > > > $white = imagecoloralloc ate($im, 255, 255, 255);
            > > > imagefill($im,0 ,0,$white);
            > > > imagestring($im ,$fnt,0,0,$addy ,$black);
            > > > imagejpeg($im);
            > > > exit();
            > > > ?>
            > > >
            > > > make sure no space, or blank line before first <?php tag
            > > >
            > > > --
            > > > Mike Bradley
            > > > http://www.gzentools.com -- free online php tools
            > > >
            > > >[/color][/color][/color]


            Comment

            Working...