1. How do I get the image to automatically expand to the size of the text string from the song.txt file? Is this possible?
2. Why is there a strange yen type character being displayed after each song? Here's an example:

Code: Select all
<?php
$song = fopen("http://bst82551.ath.cx:8181/song.txt", "r");
$name = fread($song, 1024);
$im = imagecreatetruecolor(300, 15);
$color = imagecolorallocate($im, 223, 223, 223);
imagestring($im, 2, 1, 1, "Now Playing: ".$name."", $color);
imagejpeg($im);
imagedestroy($im);
?>