Mercurial > hg > webaudioevaluationtool
diff keygen.php @ 1241:879b0b20b20c
WIP. Adding intermediate save options. Will require mass editing of save engine as it stands, so still WIP (note: this version will not work on python server).
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Wed, 09 Mar 2016 11:12:06 +0000 |
parents | a54422902bbd |
children | 5b125fb39142 |
line wrap: on
line diff
--- a/keygen.php Tue Mar 08 18:12:14 2016 +0000 +++ b/keygen.php Wed Mar 09 11:12:06 2016 +0000 @@ -1,7 +1,7 @@ <?php // This checks the key sent by the JavaScript against the current bunch of saves // XML Saves location - assumes it will be saves/ -$saves = glob("../saves/*.xml"); +$saves = glob("saves/*.xml"); $key_requested = $_GET['key']; @@ -26,8 +26,12 @@ echo $xml_good; // TODO: // Generate the XML Base file and save it + $doc_struct = new SimpleXMLElement('<waetresult/>'); + $doc_struct->addAttribute("key",$key_requested); // Add start time // Add IP Address information + // Save the file + $doc_struct->asXML("saves/save-".$key_requested.".xml"); return; } else { echo $xml_error;