$r=fopen($file_name,'r'); $text=fread($r,1000); fclose($r); $mass=explode(",", $text);
<?php header("Content-type: image/jpeg"); $im = @ImageCreateFromJPEG ("userbar.jpg") ; $color = imagecolorallocate($im, 0, 255, 0); $cp1251=1; $cachefile="cache8020.dat"; if(@filemtime($cachefile)<time()-10) { $informer=@file_get_contents("http://myradio24.com/users/8020/status.txt"); if($utf8) $informer=@iconv("windows-1251","utf-8//TRANSLIT",$informer); file_put_contents($cachefile,$informer); } //get info $informer=explode("|",file_get_contents($cachefile)); $informer[djname]=$informer[3]; $informer[song]=$informer[9]; $informer[song]=$informer[5]; imagettftext($im, 10, 0, 45, 13, $color, "Visitor TT2 -BRK-.ttf", "Dj: ".$informer[3]); imagettftext($im, 10, 0, 20, 23, $color, "Visitor TT2 -BRK-.ttf", "Song: ".$informer[9]); imagettftext($im, 10, 0, 20, 33, $color, "Visitor TT2 -BRK-.ttf", "Listens: ".$informer[5]); imagejpeg($im, NULL, 100); imagedestroy($im); ?>