Securing email links in php

Discussion in 'PHP' started by Napoleon, Sep 17, 2008.

  1. #1
    How do I secure emails using php? Domain tools uses images to display them like this. Should I use GD to do that?
     
    Napoleon, Sep 17, 2008 IP
  2. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes you will have to use GD to do that...
     
    hamidof, Sep 17, 2008 IP
  3. cornetofreak

    cornetofreak Peon

    Messages:
    170
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you could do somthing like this (GD)

    
    header ("Content-type: image/png");
    $im = @ImageCreate (200, 30);
    $background_color = ImageColorAllocate ($im, 255, 255, 255);
    imagecolortransparent($im,$background_color);
    $text_color = ImageColorAllocate ($im, 233, 14, 91);
    ImageString ($im, 3, 5, 5, "E-MAIL ADDRESS HERE", $text_color);
    ImagePNG ($im);
    
    PHP:
    thanks
     
    cornetofreak, Sep 17, 2008 IP
    Napoleon likes this.
  4. Napoleon

    Napoleon Peon

    Messages:
    732
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks a lot, it seems to work. Does it take up a lot of resources to do that when you have many images in a single page?
     
    Napoleon, Sep 17, 2008 IP
  5. happpy

    happpy Well-Known Member

    Messages:
    926
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    120
    #5
    you could extend this script easily to cache results in a temp-dir to speed up the rendering.

    rendering a lot of text-images each time a unique users loads a page sure takes some resources on the server. more as if serving static pages.
    if you need this script with a caching function, PM me.
     
    happpy, Sep 17, 2008 IP