Hallo zusammen.
Ich habe ein kleines Problem: nämlich wird mein Bild nicht angezeigt.
Der Code:
Dazu möchte ich noch sagen, es hat eine Zeit lange funktioniert und plötzlich ging nichts mehr
Es sollte als billige Captcha Verschlüsselung dienen
Ich habe ein kleines Problem: nämlich wird mein Bild nicht angezeigt.
Der Code:
PHP-Code:
<?php
session_start();
header('Content-Type: image/jpeg');
$text = $_SESSION['secure'];
$font_size = 14;
$image_width = 60;
$image_height = 16;
$image = imagecreate($image_width, $image_height);
imagecolorallocate($image, 255, 255, 255); //hintergrundfarbe
$text_color = imagecolorallocate($image, 0, 0, 0); //Textfarbe
for ($x=1; $x<=40; $x++) { //koordinaten randomisieren
$x1 = rand(1, 60);
$y1 = rand(1, 60);
$x2 = rand(1, 60);
$y2 = rand(1, 60);
imageline($image, $x1, $y1, $x2, $y2, $text_color); //Koordinaten der Linien
}
imagettftext($image, $font_size, 0, 5, 15, $text_color, 'default/verdana.ttf', $text); //font usw.
imagejpeg($image);
?>
Es sollte als billige Captcha Verschlüsselung dienen
Kommentar