Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $x = intval($_REQUEST['x']);
- $y = intval($_REQUEST['y']);
- if ($_REQUEST['submit']) {
- // extract data from post and save it to a file
- $data = $_POST['data'];
- $key = "$x,$y";
- $filename = "tmp/" . $key . '-' . rand()%100;
- file_put_contents($filename, json_encode($data));
- // run save.py
- $result = trim(shell_exec("python save.py '$x' '$y' '$filename' 2>&1"));
- if ($result != 1) {
- die("Error saving. $result<HR>");
- }
- print "<script>window.location = 'index.php';</script>";
- return;
- }
- $time = time();
- print <<<EOF
- //...
Advertisement
Add Comment
Please, Sign In to add comment