Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Software-Projekte der Mitglieder (https://www.delphipraxis.net/26-software-projekte-der-mitglieder/)
-   -   PHPimg - Ein Prog. um PHP bspw. für Captchas zu erzeugen. (https://www.delphipraxis.net/78607-phpimg-ein-prog-um-php-bspw-fuer-captchas-zu-erzeugen.html)

EDatabaseError 8. Okt 2006 09:52

Re: PHPimg - Ein Prog. um PHP bspw. für Captchas zu erzeugen
 
Zitat:

Zitat von klaus.meyer
Da hat sich wohl ein kleiner Fehler im PHP-Code eingeschlichen

Code:
<?php
 // Created with PHPimg //
 // (C) Tobias Hocke //
 // [url]http://www.tobias-hocke.de[/url] //

 $breite = 100;
 $hoehe = 100;
 $img = imagecreate($breite,$hoehe);

 $clWhite = imagecolorallocate($img,255,255,255);

 $clBlack = imagecolorallocate($img,0,0,0);

 $x1 = 2 // Semikolon fehlt
 $y1 = 5 // Semikolon fehlt
 $x2 = 1 // Semikolon fehlt
 $y2 = 3 // Semikolon fehlt

 imageline($img, $x1, $y1, $x2, $y2, $clBlack);

 header("Content-type: image/png");
 imagepng($img,"image.png");
 imagedestroy($img);
?>
Die Strichpunkte nach den Variablendeklarationen fehlen.
Aber sonst eine wirklich nette Idee.

Bug gefixt ;-)

Mfg
tobi

arbu man 8. Okt 2006 10:49

Re: PHPimg - Ein Prog. um PHP bspw. für Captchas zu erzeugen
 
Hm funktionier nicht so wirklich

Code:
 $clWhite = imagecolorallocate($img,255,255,255);

 $clBlack = imagecolorallocate($img,0,0,0);

 $clBlack = imagecolorallocate($img,0,0,0);
Warum ist die zeile den zweimal da ?
Irgentwie scheint der und irgentwie scheint der immer eine zeile nicht zu erstellen wenn man mehr als 2 zeilen hat :gruebel:

Ansonsten funktioniert es vielleicht solltest du noch funktionen zur richtigen ausgabe der grafik einbauen.
Edit: sehe es grade die funktion gibt es schon.

mfg, Björn


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:32 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz