PHP code to receive data on the server¶
There was a previous version of the data saving code called save_data.php. There were security problems with this code! If you are using this, please delete it and use the code below.
Click here to download the data saving code
Note that:
Please do not call the file save_data.php on the server. As it’s the same name as the old, insecure file it may end up being flagged as insecure.
Once downloaded, delete the
.txtat the end of the filename.If you’re using a different site (not jspsychlearning), change the line
header('Access-Control-Allow-Origin: https://jspsychlearning.ppls.ed.ac.uk');to reflect that.At the top of the file, edit the line
$dataDir = '/home/username/server_data'and changeusernameto your username on the server. (This will be your University username, the same as the one you use to log in to the server).
