Mercurial > hg > webaudioevaluationtool
diff save.php @ 1242:987ccc04250b
Session now performs intermediate saves on each advanceState trigger (page completions, survey completions). Specification projectReturn now "local" for presentation saving
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Wed, 09 Mar 2016 12:41:26 +0000 |
parents | 8c56eda17acd |
children | 83b439322229 |
line wrap: on
line diff
--- a/save.php Wed Mar 09 11:12:06 2016 +0000 +++ b/save.php Wed Mar 09 12:41:26 2016 +0000 @@ -9,10 +9,9 @@ header('Access-Control-Allow-Origin: *'); header("Content-type: text/xml"); $postText = file_get_contents('php://input'); - $sha1_hash = sha1($postText); - $datetime = date('ymdHis'); - $xmlfile = "save".$datetime."-".$sha1_hash.".xml"; - $fileHandle = fopen("saves/".$xmlfile, 'w'); + $file_key = $_GET['key']; + $filename = "saves/save-".$file_key.".xml"; + $fileHandle = fopen($filename, 'w'); if ($fileHandle == FALSE) { // Filehandle failed