<?php

    //set it to writable location, a place for temp generated PNG files
    $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR;

    //html PNG location prefix
    $PNG_WEB_DIR = 'temp/';

    include "qrlib.php";

    //ofcourse we need rights to create temp dir
    if (!file_exists($PNG_TEMP_DIR))
        mkdir($PNG_TEMP_DIR);


    $filename = $PNG_TEMP_DIR.'demo.png';

    $matrixPointSize = 5;

    //default data
    QRcode::png('https://faktur.ardosoft.com/app', $filename, $errorCorrectionLevel, $matrixPointSize, 2);

    //display generated file
    echo '<img src="'.$PNG_WEB_DIR.basename($filename).'" />';

    // benchmark
    //QRtools::timeBenchmark();
