if (isset($_REQUEST['uploaded_filenamepath'])) {
            printf("<p>non-GPC: filename='%s'</p>\n", $_REQUEST['uploaded_filenamepath']);
        }
    }
    $fp = fopen($tmpName, 'r');
    if ($fp != 0) {
        $content = fread($fp, $fileSize);
        fclose($fp);
    } else {
        $content = "bogus\n";
    }
    printf("<p>file content:</p><pre>%s</pre>\n", $content);
    // print_r(hash_algos());
    printf("<p>hash = '%s'</p>\n", hash("crc32", $content));
    printf("<p>Test fractions ...</p>\n");
    Fraction::Test();
}
// collect configuration: load presets, append custom file content. Feed that combined mess to the 'cleaner' and then the generator.
$config = "";
if (isset($_REQUEST['language'])) {
    $language = strip_tags($_REQUEST['language']);
    if (strlen($language) > 0) {
        $config .= sprintf("language: %s\n", $language);
    }
}
if (isset($_REQUEST['chapter'])) {
    $chapter = (int) $_REQUEST['chapter'];
    $config .= sprintf("chapter: %d\n", $chapter);
}
if (isset($_REQUEST['ex_cnt'])) {
    $ex_cnt = (int) $_REQUEST['ex_cnt'];