e-posta adresimizi web sitemize yazar yazmaz yükselen bir grafikle posta kutumuza spam postalar yağıyor. e-posta adresimizi resme çevirip sitemize koyarsak bu seferde ziyaretçiler yada site sahibi bu durumdan hoşlamıyor.
e-posta adreslerimizi bir php sayfanın içine yazabiliriz;
adresler.php
|
|
| <?php
| | $ali = "ali@siteismi.com";
| | $veli = "veli@siteismi.com";
| | $kirdokuzelli = "kirdokuzelli@siteismi.com";
| | ?> |
|
posta göndermek için sayfamız;
posta.php
|
|
| <?php
| | include 'adresler.php'; //sayfamizi cagiriyoruz.
| | $x = $_GET['a']; //adresten parametreyi aliyoruz
| | $isim = $$x; //parametreyi fonksiyona donusturuyoruz.
| | header("Location:mailto:$isim"); //eslesen posta adresine yonlendiriliyoruz.
| | ?> |
|
e-posta adreslerini sayfamıza resim olarak yansıtan;
resim.php
|
|
| <?php
| | include 'adresler.php'; //sayfamizi cagiriyoruz
| | $x = $_GET['a']; //adresten parametreyi aliyoruz
| | $isim = $$x; //parametreyi fonksiyona donusturuyoruz.
| | $resim = imagecreate(220,20); //resim buyuklugu
| | $beyaz = imagecolorallocate($resim, 255, 255, 255); //renk secimi
| | $siyah = imagecolorallocate($resim, 0, 0, 0); //renk secimi
| | imagestring($resim, 10, 5, 0,$isim, $siyah); //yazi tipi
| | header("Content-type: image/png"); //olusturulacak resim formati
| | imagepng($resim);
| | imagedestroy($resim);
| | ?> |
|
son olarakta html sayfamız;
sayfa.html
|
|
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| | <html xmlns="http://www.w3.org/1999/xhtml">
| | <head>
| | <title>deneme</title>
| | </head>
| | <body>
| | <a href="posta.php?a=veli" target="_blank"><img src="resim.php?a=veli" border="0"/></a>
| | </body> |
|