diff options
author | Patrick Simianer <p@simianer.de> | 2016-06-07 17:11:08 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2016-06-07 17:11:08 +0200 |
commit | 83db5f918da692f13bd0fd886caf5374337e1d00 (patch) | |
tree | e3907077889037e31221c072d793f40558447187 /pool_save.php | |
parent | 2380944390691789dfaea133cd76f3c921820272 (diff) |
pool
Diffstat (limited to 'pool_save.php')
-rw-r--r-- | pool_save.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pool_save.php b/pool_save.php new file mode 100644 index 0000000..5d67a25 --- /dev/null +++ b/pool_save.php @@ -0,0 +1,25 @@ +<?php + +if (!$_GET['session'] || !$_GET['name']) { + echo "empty"; + return; +} + +$f = fopen(tempnam("../tmp", "assignment-"), "wa"); + +fwrite($f,urldecode($_GET["name"])."\n"); +fwrite($f,urldecode($_GET["session"])."\n"); +fwrite($f,getdate()[0]."\n"); +fclose($f); + +$checkf = "../tmp/".urldecode($_GET["session"]); +if (file_exists($checkf)) { + echo "notok"; +} else { + $g = fopen($checkf, "wa"); + fwrite($g, "x\n"); + fclose($g); + echo "ok"; +} + +?> |