Mercurial > hg > webaudioevaluationtool
diff save.php @ 1886:49d06c3dc44e
Merge
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Wed, 09 Mar 2016 14:12:22 +0000 |
parents | bf2a7da8d6ae b7db6a837242 |
children | ba6b9e1aaef5 |
line wrap: on
line diff
--- a/save.php Wed Mar 09 14:04:31 2016 +0000 +++ b/save.php Wed Mar 09 14:12:22 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