<?php
    chdir('../../../../');
    include('bootstrap.php');

    $place = isset($_GET['place'])  ?   (is_array($_GET['place']))   ?   intval($_GET['place'][0]) :   intval($_GET['place'])      : null;

    $query = mysql_query("SELECT `place`, `image`, `imagetype` FROM `topvideo` WHERE `place` = '" . $place . "'");
    if (mysql_num_rows($query))
    {
        while ($row = mysql_fetch_array($query))
        {
            $im = imagecreatefromstring($row['image']);
            if ($im !== false)
            {
                header('Cache-Control: public, proxy-revalidate');
                header('Last-Modified:Mon, 02 Nov 2009 09:50:18 GMT');
                header('Expires: ' . gmdate ("D, d M Y H:i:s", time() + 60 * 60 * 24 * 24 . ' GMT');

                header('Content-Type: image/jpeg');
                imagejpeg($im);
                imagedestroy($im);
            }
        }
    }

The fact is always 200, but I have to cache the look for just two days and also the response was 304.... why? sorry for bad british

to transmit 304 You have to include Etag inside your response headers, etag is one thing like hash of content itself and date of it's creation.

Once you include etag in reaction the browser will be sending you request header "If-None-Match".

You need to match it up headers and when they match respond with 304, otherwise send new quite happy with new Etag header and status 200.