annotate pseudo.php @ 1309:e8b1aa4f2c0a

Python score/comment parsers use new <page> rather than deprecated <audioholder>. Added score_parser.php
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Thu, 18 Feb 2016 10:55:36 +0000
parents cc55cc323592
children
rev   line source
nickjillings@1306 1 <?php
nickjillings@1306 2 header('Access-Control-Allow-Origin: *');
nickjillings@1306 3 header("Content-type: text/xml");
nickjillings@1306 4 $files = glob('saves/' . '*.xml');
nickjillings@1306 5 $numsaves = 0;
nickjillings@1306 6 if ( $files !== false )
nickjillings@1306 7 {
nickjillings@1306 8 $numsaves = count( $files );
nickjillings@1306 9 }
nickjillings@1306 10
nickjillings@1306 11 $files = glob('pseudo/' . '*.xml');
nickjillings@1306 12 $numtests = 0;
nickjillings@1306 13 if ( $numtests !== false )
nickjillings@1306 14 {
nickjillings@1306 15 $numtests = count( $files );
nickjillings@1306 16 }
nickjillings@1306 17
nickjillings@1306 18 $testID = ($numsaves % $numtests)-1;
nickjillings@1306 19
nickjillings@1306 20 readfile($files[$testID]);
nickjillings@1306 21 ?>