diff options
Diffstat (limited to 'chall/src/transpile.php')
| -rw-r--r-- | chall/src/transpile.php | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/chall/src/transpile.php b/chall/src/transpile.php deleted file mode 100644 index 44de755..0000000 --- a/chall/src/transpile.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - - -$input = json_decode(file_get_contents('php://input'), true); -if (!isset($input["code"])) { - echo json_encode(array("error" => "no input data")); - die(); -} - -$tmpfname = tempnam("/tmp", "lolpython_prog_"); -$handle = fopen($tmpfname, "w"); -fwrite($handle, $input["code"]); -fclose($handle); - -$stdout = shell_exec("python2 /opt/lolcode.py $tmpfname"); - -echo(json_encode(array("result" => $stdout))); -?>
\ No newline at end of file |
