summaryrefslogtreecommitdiffstats
path: root/chall/src/transpile.php
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2024-03-30 15:37:05 +0100
committerLouis Burda <quent.burda@gmail.com>2024-03-30 15:37:05 +0100
commit32309e019f2ff7d9f69f3e0016f67439e81b8b30 (patch)
treeace9fccd48489648b0586a8f84da21839632d0b9 /chall/src/transpile.php
parent4007ea18f294aefb6128cbe82c5446cd8cb72c50 (diff)
downloadcscg24-lolpython-32309e019f2ff7d9f69f3e0016f67439e81b8b30.tar.gz
cscg24-lolpython-32309e019f2ff7d9f69f3e0016f67439e81b8b30.zip
Rename to solve
Diffstat (limited to 'chall/src/transpile.php')
-rw-r--r--chall/src/transpile.php18
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