Listing 31.2. Rozwiązanie ćwiczenia 31.6
header('Content-Type: image/jpg');

$gzfile = gzopen('fotka.xml.gz', 'r');
if ($gzfile === false) {
    exit();
}
$xml = '';
while (!gzeof($gzfile)) {
    $xml .= gzread($gzfile, 10000);
}
gzclose($gzfile);

$xml = simplexml_load_string($xml);
echo base64_decode($xml->obraz);
