blob: b984084613ec0fcbf1fd59f10b69996064f71ad3 [file] [log] [blame]
Jonas Häggqvistb632ed12010-01-30 02:04:47 +00001<?php
2 $height = 15;
3 $width = 150;
4 $percent = $_REQUEST['p'];
5 $im = imagecreatetruecolor($width, $height);
6 $translated = imagecolorallocate($im, 0, 255, 0);
7 $missing = imagecolorallocate($im, 255, 0, 0);
8 imagefill($im, 0, 0, $missing);
9 imagefilledrectangle($im, 0, 0, $width * $percent / 100, $height, $translated);
10 header("Content-type: image/png");
11 imagepng($im);
12?>