Forum Moderators: coopster
<?php
$w = 16 - ((16/10)*$_GET['id']);
header("Content-type: image/gif");
$im = imagecreatefromgif("full.gif");
$col = imagecolorallocate($im,30,30,42);
imagefilledrectangle($im, 16-$x,0,16,16,$col);
imagegif($im);
imagedestroy($im);
?>
but it just returned a normal full.gif image.
Please can I have some advice on where my code is going wrong.
The image is 16 by 16 px and the background color of my page is in $col
Thanks for any help
Chris
Frankly, I would simply create a star and a half star in GIMP or PS and, depending on the rating, display as required. It's simple requires no server image processing and you'll get more caching benefit since you'll only have 2 images instead of 19 for every value from .5 to 10 stars.