<?php
$bild = imagecreatefrompng("d.png");
$Datum = "14.04.2007 10:05:00"; // Schrift
$Zieldatum = mktime(substr($Datum, 11, 2), substr($Datum, 14, 2), substr($Datum, 17, 2), substr($Datum, 3, 2), substr($Datum, 0, 2), substr($Datum, 6, 4), -1);
$Differenz = $Zieldatum-time();
$Tage = floor($Differenz/86400);
$Rest = $Differenz-($Tage*86400);
$Stunden = floor($Rest/3600);
$Rest = $Rest-($Stunden*3600);
$Minuten = floor($Rest/60);
$Rest = $Rest-($Minuten*60);
$Zeit = "T:$Tage - H:$Stunden - M:$Minuten - S:$Rest";
$blau = imagecolorresolve($bild, 47, 214, 250);
$hinter = imagecolorresolve($bild, 255, 255, 255);
imagecolortransparent($bild, $hinter);
imagestring($bild, 7, 5, 1, "$Zeit", $blau);
// Hier header ausgeben und Bild erstellen...
header("Content-type:image/png");
//bild erstellen
imagepng($bild, '', 100);
imagedestroy($bild);
?>