PHP
<?php
$name = $_GET['id'];
$ini=file_get_contents("%s.ini", name);
$w=imagefontwidth(2)*25+4;
$h=imagefontheight(2)*substr_count($ini,"\n")+4;
$image=imagecreate($w,$h);
imagefilledrectangle($image,0,0,$w,$h,imagecolorallocate($image,255,255,255));
$ini=explode("\n",$ini);
foreach($ini as $line=>$string){
$string=explode("=",$string);
imagestring($image,2,2,$line*imagefontheight(2)+2,$string[0],imagecolorallocate($image,0,0,0));
imagestring($image,2,$w-2-imagefontwidth(2)*strlen($string[1]),$line*imagefontheight(2)+2,$string[1],imagecolorallocate($image,0,0,0));
}
header('Content-type:image/png');
imagepng($image);
imagedestroy($image);
?>
Alles anzeigen
Würde dieser Code hier funktionieren??
Achtet auf $ini