title: Convert email to an image?
body: <p>I am wondering how can I convert my website user's emails to images?  </p>
  
  <p>I have an ads site and I want to protect users emails by using this tool. I seen many websites that offer this task but I want to do it on site for each user email that is displayed.</p>
  
  <p>Any clues? </p>
  
  <p>I am using PHP to do this:</p>
  
  <pre><code>if (isset($_GET['text'])) {
      // get string
      $text = $_GET['text'];
  } else {
      // set default
      $text = 'liame';
  };
  // reverse string
  $text = strrev($text);
  $textLength = strlen($text);
  $textHeight = 10;
  
  // create image handle
  $image = ImageCreate($textLength*($textHeight-1),20);
  
  // set colours
  $backgroundColour = ImageColorAllocate($image,255,255,255); // white
  $textColour = ImageColorAllocate($image,0,0,0); // black
  
  // set text
  ImageString($image,$textHeight,0,0,$text,$textColour);
  
  // set correct header  
  header('Content-type: image/png');
  
  // create image
  ImagePNG($image);
  </code></pre>
  
  <p>and then</p>
  
  <pre><code>$email = $row['email'];
  
  &lt;img src="image.php?text=&lt;?php echo $email; ?&gt;" alt="Hidden Email" /&gt;
  </code></pre>
  
  <p>but it doesn't work, the image shows as broken.</p>