> Forums > PHP

D

Dynamisches Bild mit Text aus einer *.txt-Datei

Erstellt
Okt. '06
letzte Antwort
Noch keine
Antworten
Noch keine
Aufrufe
3.6T
1
„Gefällt mir“
Abos
Noch keine
Mi., 18. Oktober, 2006 um 23:46
#1

Dieser Code erzeigt ein Dynamisches Bild mit einem Text aus einer Textdatei ...

PHP:
<?php
$text_datei = "text.txt"; //Namen der Textdatei

$fp = fopen("$text_datei", "r");
while($text=fgets($fp,45))
$text2 = $text;

header ("Content-type: image/PNG");
$mein_bild = ImageCreate (400, 20);
$weiss = ImageColorAllocate ($mein_bild,255,255,255);
$blau = ImageColorAllocate ($mein_bild, 21, 0, 177);
$gruen = ImageColorAllocate ($mein_bild, 50,148,0);
$rot = ImageColorAllocate ($mein_bild, 255,0,25);
$hellblau = ImageColorAllocate ($mein_bild,0,255,242);
$schwarz = ImageColorAllocate ($mein_bild,0,0,0);

ImageString ($mein_bild, 3, 2, 1, "$text", $schwarz);
ImagePNG ($mein_bild);

fclose($fp);

?>




C&M distanziert sich konkret und ausdrücklich vom Inhalt dieses Postings.
Der Ersteller des Postings haftet für seine Äußerungen.
Inhalte, die nicht den Forumsregeln entsprechen sind bitte vom Leser zu melden ...
 
0
 
0

echo "Php Rules!";
http://www.php.net

> Forums > PHP

Du hast bereits für diesen Post abgestimmt...

;-)



Logo https://t.ress.at/4ceK9/


Ähnliche Themen: