How to access data in php transferred via webwrite?

1 Ansicht (letzte 30 Tage)
Benvaulter
Benvaulter am 4 Apr. 2016
Hey everyone,
I am using webwrite to parse some data to a php script like so:
data = struct('userId', 'testuser','Password', 1234);
url = 'http://example.info/php/test.php';
options = weboptions('MediaType', 'application/json');
response = webwrite(url, data, options);
I want to access the data originally stored in the struct in my php script, but don't know how I can refer to the parsed data in the php script (is it similar to using "GET" and "POST" when using URL-encoded data?)
To start with, I'd simply like to display the transferred data with php like so:
$data = json_decode($data,true);
echo '<pre>' . print_r($json, true) . '</pre>';
As mentioned above, my problem is how I can get the now json-encoded struct element sent by Matlab into the php variable "$data".
Thanks in advance!

Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by