=3){ $roomfile=md5(VIRTUALHOST.'qr'.$room); if(file_exists('./data/room-qr/'.$roomfile.'.png')){ header("Content-type: image/png"); echo file_get_contents('./data/room-qr/'.$roomfile.'.png'); exit; } else { require_once('./tools/qr/qrlib.php'); QRcode::png($room, './data/room-qr/'.$roomfile.'.png', 'L', 8, 2); header("Content-type: image/png"); echo file_get_contents('./data/room-qr/'.$roomfile.'.png'); exit; } } else { echo 'Invalid room number!'; } } else { echo 'Room number not defined!'; die(); } ?>