14 lines
433 B
PHP
14 lines
433 B
PHP
<?php
|
|
$tstamp = round(microtime(true)*100); # 0.01 sec resolution
|
|
$name = "gmaze.".$tstamp.".json";
|
|
exec("python genmaze.py ".$name);
|
|
|
|
//header("location: ".$name, true, 302); // Temporary redirect not effective against Phaser caching
|
|
|
|
$data = file_get_contents($name);
|
|
$data = str_replace(".php#", ".".$tstamp.".php#", $data); // Patch php-exits to prevent caching
|
|
|
|
header('Content-type: application/json');
|
|
echo($data);
|
|
exit;
|
|
?>
|