T
themasterrocker
Guest
Hey guys, I've got a php on my addon domain and everytime someone loads the page it comes back with this error: and the other PHP is uploaded, so it can't be that.
But Me or Leafypiggy don't know whats wrong with it? Woiwky made me the php file. This is the php file
Code:
[16-Aug-2008 16:24:00] PHP Fatal error: Call to undefined function imagecreatefromgif() in /home/sourmash/public_html/helprunescape.net/radio/current_song.php on line 34
But Me or Leafypiggy don't know whats wrong with it? Woiwky made me the php file. This is the php file
PHP:
<?php
//current_song.php
$file = 'song.txt';
$image = 'radioimage.gif';
$font = 'Tahoma.ttf';
$size = 9;
$fp = @fopen($file, 'r');
$song = fread($fp, 512);
fclose($fp);
list($song, $length) = explode("\n", $song);
include 'time_remaining.php';
$length = explode(':', $length);
$length = (intval($length[0]) * 60) + intval($length[1]);
$length -= time() - filemtime($file);
if ($length < 1) {
$song = 'Between songs or offline';
}
if (strlen($song) > 32) {
$p = strrpos(substr($song, 0, 32), ' ');
$song = array(trim(substr($song, 0, $p)), trim(substr($song, $p)));
if (strlen($song[1]) > 32) {
$song[1] = substr($song[1], 0, 32) . '...';
}
}
else {
$song = array($song, '');
}
$img = imagecreatefromgif($image);
$blue = imagecolorallocate($img, 0, 0, 255);
$black = imagecolorallocate($img, 0, 0, 0);
imagettftext($img, $size, 0, 170, 46, $black, $font, $song[0]);
imagettftext($img, $size, 0, 169, 45, $blue, $font, $song[0]);
imagettftext($img, $size, 0, 170, 60, $black, $font, $song[1]);
imagettftext($img, $size, 0, 169, 59, $blue, $font, $song[1]);
header('Content-type: image/gif');
imagegif($img);
?>
Last edited by a moderator: