To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / pseudo.php
History | View | Annotate | Download (435 Bytes)
| 1 |
<?php
|
|---|---|
| 2 |
header('Access-Control-Allow-Origin: *'); |
| 3 |
header("Content-type: text/xml"); |
| 4 |
$files = glob('saves/' . '*.xml'); |
| 5 |
$numsaves = 0; |
| 6 |
if ( $files !== false ) |
| 7 |
{
|
| 8 |
$numsaves = count( $files ); |
| 9 |
} |
| 10 |
|
| 11 |
$files = glob('pseudo/' . '*.xml'); |
| 12 |
$numtests = 0; |
| 13 |
if ( $numtests !== false ) |
| 14 |
{
|
| 15 |
$numtests = count( $files ); |
| 16 |
} |
| 17 |
|
| 18 |
$testID = ($numsaves % $numtests)-1; |
| 19 |
|
| 20 |
readfile($files[$testID]); |
| 21 |
?>
|