No wiesz ja tego do końca za Ciebie nie zrobię gdyż to ne jest tego typu forum, tutaj się pomaga nie odwala za kogoś robotę, ale to będzie coś w tym stylu (mogą być błędy, pisałem z palca):
<?PHP
header('Content-Type: image/png'); $max_slots = 32;
$wysokosc = 200;
$szerokosc = 400;
for ($i =0;$i<20;$i++)
{
$rand = rand(5
,$max_slots); $value = ($rand / $max_slots) * $wysokosc - 5;
$gracze[] = $value;
}
$im = imagecreate (400, 200);
$black = imagecolorallocate($im, 0, 0, 0);
$w = ImageColorAllocate ($im, 255, 255, 255);
$red = ImageColorAllocate ($im, 255, 0, 0);
$blue = ImageColorAllocate ($im, 0, 0, 255);
$green = ImageColorAllocate ($im, 0, 255, 0);
imagefilledrectangle ($im, 0, 0, $szerokosc, $wysokosc, $black);
$szerokosc_pola = $szerokosc / count($gracze);
foreach($gracze AS $i => $serwer)
{
if (isset($gracze[$i+1
])) {
$colour = ImageColorAllocate ($im, 255 - (($i*$szerokosc_pola) * 100 / $szerokosc), (($i*$szerokosc_pola) * 100 / $szerokosc), 0);
imageline($im, ($i*$szerokosc_pola) + 5, $wysokosc - $serwer, ($i+1)*$szerokosc_pola + 5, $wysokosc - $gracze[$i + 1], $colour);
}
}
imageline($im, 5, 10, 5,$wysokosc - 5, $w);
imageline($im, 5, $wysokosc - 5, $szerokosc - 5,$wysokosc - 5, $w);
imagestring ($im, 5, 10, 1, $max_slots, $w);
imagestring
($im, 5
, 10
, $wysokosc / 2
- 20
, round($max_slots/2
), $w); imagestring ($im, 5, 10, $wysokosc - 20, 0, $w);
imagepng($im);
?>