Senin, 28 Desember 2009

Email To Image With PHP to reduce Spam

Email To Image

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 ;

<?php
header("Content-type: image/png");
// 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);
imagepng ($im);
?>



and the other one is a Common File to Call the Image.

Email To ImageHow we call the image from the common file ?
Simple, Just Use : Email : <img src=emailtoimage.php?email=$data[email]>

Related Post:

Tidak ada komentar: