annotate pseudo.php @ 1303:ade3acb0cee3

Added score_parse.php separators for CSV
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Tue, 23 Feb 2016 17:11:28 +0000
parents
children
rev   line source
nickjillings@1303 1 <?php
nickjillings@1303 2 header('Access-Control-Allow-Origin: *');
nickjillings@1303 3 header("Content-type: text/xml");
nickjillings@1303 4 $files = glob('saves/' . '*.xml');
nickjillings@1303 5 $numsaves = 0;
nickjillings@1303 6 if ( $files !== false )
nickjillings@1303 7 {
nickjillings@1303 8 $numsaves = count( $files );
nickjillings@1303 9 }
nickjillings@1303 10
nickjillings@1303 11 $files = glob('pseudo/' . '*.xml');
nickjillings@1303 12 $numtests = 0;
nickjillings@1303 13 if ( $numtests !== false )
nickjillings@1303 14 {
nickjillings@1303 15 $numtests = count( $files );
nickjillings@1303 16 }
nickjillings@1303 17
nickjillings@1303 18 $testID = ($numsaves % $numtests)-1;
nickjillings@1303 19
nickjillings@1303 20 readfile($files[$testID]);
nickjillings@1303 21 ?>