view pseudo.php @ 1236:80b034411b89

WAC2016: Template update
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Sat, 05 Mar 2016 09:27:16 +0000
parents d2afd2ee8684
children
line wrap: on
line source
<?php
    header('Access-Control-Allow-Origin: *');
	header("Content-type: text/xml");
    $files = glob('saves/' . '*.xml');
    $numsaves = 0;
    if ( $files !== false )
    {
        $numsaves = count( $files );
    }

    $files = glob('pseudo/' . '*.xml');
    $numtests = 0;
    if ( $numtests !== false )
    {
        $numtests = count( $files );
    }

    $testID = ($numsaves % $numtests)-1;

	readfile($files[$testID]);
?>