Mercurial > hg > waet-hammond-1
diff new/php/pseudo.php @ 15:853caf8cd74b
Update
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Wed, 04 May 2016 17:25:19 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/new/php/pseudo.php Wed May 04 17:25:19 2016 +0100 @@ -0,0 +1,21 @@ +<?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('tests/' . '*.xml'); + $numtests = 0; + if ( $numtests !== false ) + { + $numtests = count( $files ); + } + + $testID = ($numsaves % $numtests)-1; + + readfile($files[$testID]); +?> \ No newline at end of file