Mercurial > hg > webaudioevaluationtool
changeset 292:08eee15e07d9 Dev_main
PHP Upload Session scripts
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Wed, 09 Sep 2015 10:34:55 +0100 |
parents | 7e9c38fa7499 |
children | 522b0b0da26e |
files | example_eval/project.xml save.php |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/example_eval/project.xml Tue Jul 28 12:00:46 2015 +0100 +++ b/example_eval/project.xml Wed Sep 09 10:34:55 2015 +0100 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <BrowserEvalProjectDocument> - <setup interface="MUSHRA" projectReturn="/save" randomiseOrder='true' collectMetrics='true'> + <setup interface="MUSHRA" projectReturn="save.php" randomiseOrder='true' collectMetrics='true'> <PreTest> <question id="Location" mandatory="true" boxsize="large">Please enter your location.</question> <checkbox id="experience">
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/save.php Wed Sep 09 10:34:55 2015 +0100 @@ -0,0 +1,9 @@ +<?php + head('Access-Control-Allow-Origin: *'); + $postText = file_get_contents('php://input'); + $datetime = date('ymdHis'); + $xmlfile = "save".$datetime.".xml"; + $fileHandle = fopen("saves/".$xmlfile, 'w'); + fwrite($fileHandle, $postText); + fclose($fileHandle); +?> \ No newline at end of file