Add a stub API

This commit is contained in:
nemunaire 2016-07-17 10:24:03 +02:00
parent dc2a338847
commit 08fe45abcb

18
txt.php Normal file
View File

@ -0,0 +1,18 @@
<?php
require_once("QuestionsFile.class.php");
header("Content-type: text/plain");
@$filter = $_GET["filter"];
$file = new QuestionsFile("questions.xml");
foreach($file->get_questions() as $q)
{
if (!empty($filter) && strtolower($q->getCourse()->getCode()) != $filter)
continue;
$a = $q->getAnswer();
echo $q->getQuestion()."\n > ".$a[0]."\n\n";
}
?>