The number of spam emails coming into an email account is usually due to installing an email with a direct plaintext on web page. Well, to help reduce the power of email search engine we will work with the captcha principles, which boot machine or robot can not read into the image. Now we try to display our email in the form of images like services at big website such as Facebook (Email Account Info of Facebook is in form of image).
Email To Image With PHP to reduce Spam can be done with two files. The Engine File to Convert Email To Image i named emailtoimage.php ;
// Your email address which will be shown in the image
$email = "$_GET[email]";
$length = (strlen($email)*8);
$im = @ImageCreate ($length, 20)
or die ("Kann keinen neuen GD-Bild-Stream erzeugen");
$background_color = ImageColorAllocate ($im, 255, 255, 255); // White: 255,255,255
$text_color = ImageColorAllocate ($im, 55, 103, 122);
imagestring($im, 3,5,2,$email, $text_color);
and the other one is a Common File to Call the Image.
How we call the image from the common file ?
Simple, Just Use : Email : <img src=emailtoimage.php?email=$data[email]>