view pseudo.php @ 2216:75ef314b5e64

WIP for #2: '<page>' and '<cetup'> nodes have working "poolSize" attribute to determine number of children to take forward.
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Tue, 12 Apr 2016 10:50:52 +0100
parents 175cf75946f7
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]);
?>