<?php
header("Content-type: image/png");


require('../../classes/http.class.php');
$http = new http('zordania.cliranet.com');
$xml = $http->load_page('get','/xml.php?mid='.(int)$_GET['id']);


preg_match_all('`<res_nb>(.*?)</res_nb>`',$xml,$res);
preg_match('`<points>(.*?)</points>`',$xml,$points);
preg_match('`<util>(.*?)</util>.*?<max>(.*?)</max>`s',$xml,$pop);



$v_fric = $res[1][0];
$v_nour = $res[1][1];
$v_poin = $points[1];
$v_popu = $pop[1];
$v_popm = $pop[2];


$img = imagecreatefrompng('zord_bg.png');

$col = imagecolorallocate($img,255,255,255);

imagestring($img,$police,55,29,$v_fric,$col);
imagestring($img,2,103,29,$v_nour,$col);
imagestring($img,2,165,29,$v_popu.'/'.$v_popm,$col);
imagestring($img,2,80,46,$v_poin,$col);


imagepng($img);
?>