<?php
function antyspam($tekst, $font, $size, $plik)
{
$arr = imagettfbbox($size, 0, $font, $tekst);
$width = abs($arr[2
] - $arr[0
]) + 5; $height = abs($arr[1
] - $arr[7
]) + 1; $img = imagecreatetruecolor($width, $height);
$white = imagecolorallocate($img, 255, 255, 255);
$black = imagecolorallocate($img, 0, 0, 0);
imagefill($img, 0, 0, $white);
imagecolortransparent($img, $white);
imagettftext($img, $size, 0, 0, $height - 5, $black, $font, $tekst);
imagepng($img, \"antyspam$plik\");
imagedestroy($img);
echo \"<IMG ALIGN=\"absbottom\" SRC=\"antyspam\".'/'.\"\".$plik.\"\">\"; }
?>
Za przeźroczystość odpowiada 12 linia kodu