This repository has been archived on 2020-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
nemubot-askweb/txt.php

18 lines
366 B
PHP

<?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";
}
?>