You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
601 B
12 lines
601 B
function res = download_userdata(setup_id) |
|
retrieved = webread( ... |
|
'https://driver-observer.thi.de/retrieve_arbitrary_sql.php', ... |
|
'sql', ['select userdata from setup where setup_id = ' num2str(setup_id) ';'], ... |
|
'noheader', '1', 'auth', 'Qnb7jfeGZM', weboptions('ContentType', 'text')); |
|
% Get rid of leading and trailing " (relies on greedy .*) |
|
json = regexprep(retrieved, '^"(.*)"', '$1'); |
|
json = replace(json, '""', '"'); |
|
res = reshape(jsondecode(json), 14, 3); |
|
res{1, 3} = struct2table(res{1, 3},'AsArray',true); |
|
res{1, 3}.duration = milliseconds(res{1, 3}.duration); |
|
end |