<?
Header("Content-type: image/png");

$concoun=$_GET["concoun"];


$long=400;
$larg=400;
$image = imagecreate($larg,$long);


$noir = ImageColorAllocate($image,0,0,0); 
$vert = ImageColorAllocate($image,0,255,0);
$rouge = ImageColorAllocate($image,255,0,0);
$blanc = ImageColorAllocate($image,255,255,255);
$bleu = ImageColorAllocate($image,0,0,255);
$jaune = ImageColorAllocate($image,0,255,255);


$coun=explode("!",$concoun);
$K=0;

$coul=(array) null;
$coul[0]=$jaune;
$coul[1]=$vert;
$coul[2]=$rouge;
$coul[3]=$blanc;
$coul[4]=$bleu;
$coul[5]=$jaune;
$coul[6]=$vert;
$coul[7]=$rouge;
$coul[8]=$blanc;
$coul[9]=$bleu;
$coul[10]=$jaune;
$coul[11]=$vert;
$coul[12]=$rouge;
$coul[13]=$blanc;
$coul[14]=$bleu;


for ($i=0;$i<count($coun);$i++)
{
$tmp=explode("@",$coun[$i]);
$pays=$tmp[0];
$hit=$tmp[1];

imagefilledrectangle($image,0,$K,399,$K+($hit*400)/100,$coul[$i]);
imagestring(1,10,$K,"Salut",$noir);


$K+=($hit*400)/100+1;

}


//imagefilledrectangle($image,0,0,400,120,$blanc);



imagepng($image);


?>