Hi guys,
I’m new to this forum and not sure this is the correct section to post this question.
Anyway…
I’m trying to create a contact form with an anti spam check. I don’t know why the output result of the php code for the anti spam is a small question mark as the one shown for missing images. Underneath the code I used.
Thank to everyone who can help me out
Cheers,
Lorenzo
-
-
- html
-
[php]
-
-
- php spam.php
[php] <?
- php spam.php
-
$_SESSION[“code”] = rand(11111, 99999);
header(“Content-type: image/png”);
$im = @imagecreate(55, 20)
or die(“Cannot Initialize new GD image stream”);
$background_color = imagecolorallocate($im, 0, 102, 153);
$text_color = imagecolorallocate($im, 255, 255, 255);
$line_color = imagecolorallocate($im, 0, 153, 0);
$line2_color = imagecolorallocate($im, 255, 0, 0);
imageline($im, 0, 5, 55, 5, $line_color);
imageline($im, 0, 10, 55, 10, $line_color);
imageline($im, 0, 15, 55, 15, $line_color);
imageline($im, 5, 0, 5, 55, $line2_color);
imageline($im, 15, 0, 15, 55, $line2_color);
imageline($im, 25, 0, 25, 55, $line2_color);
imageline($im, 35, 0, 35, 55, $line2_color);
imageline($im, 45, 0, 45, 55, $line2_color);
imagestring($im, 8, 5, 2, $_SESSION[“code”], $text_color);
imagepng($im);
imagedestroy($im);
?>
[/php]