I am in the process of making a RuneScape fansite. I am at the portion of the project where I am making a sig generator, I am relatively new to PHP so I have been using tutorials from around the net. I have the image displaying correctly and everything but I want to echo it out onto a webpage so the user can just copy the provided urls and be fine, my problem is not that though. There is a problem with it displaying wierdly. Refer to the following screenshot:
http://gyazo.com/40af1f4ade5b4a3f032052c5246c8491.png?1367255661
My code:
$image_link = 'image.png';
$image = imagecreatefrompng($image_link);
$font_colour = imagecolorallocate($image, 0, 0, 0);
$font_size = 3;
$x = array('28', '80', '135', '188', '240');
$y = array('8', '29', '52', '77', '100');
$i = '0';
$a = '0';
foreach($stat as $s_key => $value){
imagestring($image, $font_size, $x[$a], $y[$i], $value[1], $font_colour);
$i++;
if($i == '5'){
$i = '0';
$a++;
}
}
imagestring($image, $font_size, '230', '100', 'Total:'. $overall[1], $font_colour);
imagestring($image, $font_size, '240', '75', '' . $username, $font_colour);
imagepng($image);
imagedestroy($image);
echo '<img src="http://07tools.com/sig.php?username='.$_GET['username'].'&fakeparm=.gif" />';