I am using curl function to get the data from gotowebinar url. here is the code
$data=curl_exec($curl);
@curl_close($curl);
$newdata=json_decode($data, true);
print_r($newdata);
I am getting this output:
[
{
"registrantKey": 12345,
"firstName": "xxx",
"lastName": "xxx",
"email": "xxx@yahoo.com",
"status": "WAITING",
"registrationDate": "2012-07-11T16:54:11Z",
"joinUrl": "https://www1.gotomeeting.com/join/123/456",
"timeZone": "America/New_York"
},
{
"registrantKey": 12345,
"firstName": "xxx",
"lastName": "xxx",
"email": "xxx@yahoo.com",
"status": "WAITING",
"registrationDate": "2012-07-05T23:55:23Z",
"joinUrl": "https://www1.gotomeeting.com/join/123/456",
"timeZone": "America/New_York"
},
{
"registrantKey": 12345,
"firstName": "xxx",
"lastName": "xxx",
"email": "xxx@yahoo.com",
"status": "WAITING",
"registrationDate": "2012-07-11T23:27:56Z",
"joinUrl": "https://www1.gotomeeting.com/join/123/456",
"timeZone": "America/Chicago"
},
{
"registrantKey": 12345,
"firstName": "xxx",
"lastName": "xxx",
"email": "xxx@visioninvesting.com",
"status": "WAITING",
"registrationDate": "2012-07-11T23:29:40Z",
"joinUrl": "https://www1.gotomeeting.com/join/123/456",
"timeZone": "America/Chicago"
},
{
"registrantKey": 12345,
"firstName": "xxx",
"lastName": "xxx",
"email": "xxx@yahoo.com",
"status": "WAITING",
"registrationDate": "2012-07-11T18:14:32Z",
"joinUrl": "https://www1.gotomeeting.com/join/123/456",
"timeZone": "America/Chicago"
},
{
"registrantKey": 12345,
"firstName": "test",
"lastName": "1",
"email": "xxx@yahoo.com",
"status": "WAITING",
"registrationDate": "2012-06-29T21:07:10Z",
"joinUrl": "https://www1.gotomeeting.com/join/123/456",
"timeZone": "America/Denver"
}
]
I used json_decode
to format the data but it did not work. I want to format the output so that I can use its values in program.