//Сверху код паршера SHOUTcast ..... //Сам вывод изображения и создания на нём текста header ("Content-type: image/png"); $im = ImageCreateFromPng("blank.png"); $color = imagecolorallocate ($im, 255, 255, 255); imagettftext ($im, 8, 0, 20, 20, $color, "verdana.ttf", "Song: $song[0]"); imagettftext ($im, 8, 0, 20, 40, $color, "verdana.ttf", "Title: $servertitle"); imagettftext ($im, 8, 0, 20, 60, $color, "verdana.ttf", "RJ: $aim"); imagettftext ($im, 8, 0, 20, 80, $color, "verdana.ttf", "ICQ: $icq"); imagettftext ($im, 8, 0, 20, 100, $color, "verdana.ttf", "Listeners: $currentlisteners"); imagettftext ($im, 8, 0, 20, 120, $color, "verdana.ttf", "Bitrate: $bitrate"); imagepng ($im); imagedestroy ($im); ?>
header("Content-Type: text/html;charset=КОДИРОВКА(windows-1251, utf-8 и т.д)");
header("Content-Type: text/html;charset=windows-1251");
$song_conv = (iconv("utf-8","cp1252",$song[0]),3);
<?php if ($listeners>$max) { $text = "<?php \n"; $text .= "\$max = \"$listeners\"; \n"; $text .= "\$vizitka = \"$description\";\n"; $text .= "\$vizitka2 = \"$station_conv\";\n"; $text .= "\$igralo = \"$song_conv\";\n"; $text .= "?>"; $fp = fopen("max.php", "w+"); flock($fp, LOCK_EX); fwrite($fp, $text); flock($fp, LOCK_UN); fclose($fp); $max = $listeners; $vizitka = $description; $igralo = $song_conv; $vizitka2 = $station_conv; } ?>