Not desplaying
[code=php]
<?php
$free = disk_free_space(“./”);
$total = disk_total_space(“./”);
$left = $total-$free;
$inBar = 100*$left/$total;
?>
<img src=”ratingbar.php?rating=<?php round($inBar);?>” border=”0″>
ratingbar.php:
[code=php]
<?php
function rating($rating) {
$width = $_GET[‘width’];
$height = $_GET[‘height’];
if ($width == 0) {
$width = 300;
}
if ($height == 0) {
$height = 15;
}
$rating = $_GET[‘rating’];
$ratingbar = (($rating/100)*$width)-2;
$image = imagecreate($width,$height);
$fill = ImageColorAllocate($image,0,255,0);
$backgrd = ImageColorAllocate($image,255,255,255);
$border = ImageColorAllocate($image,0,0,0);
ImageFilledRectangle($image,0,0,$width-1,$height-1,$backgrd);
ImageFilledRectangle($image,1,1,$ratingbar,$height-1,$fill);
ImageRectangle($image,0,0,$width-1,$height-1,$border);
imagePNG($image);
imagedestroy($image);
}
haeder(“Content-type: image/png”);
rating($rating);
?>