I am a noob in api so please bear with me. I tried google searching for 1 hour but I can't understand anything from the results.
Currently, I have an API in kimono with the given example data :
{
"name": "Summoners-Details",
"count": 31,
"frequency": "On demand",
"version": 7,
"newdata": false,
"lastrunstatus": "success",
"thisversionrun": "Tue Sep 02 2014 02:34:07 GMT+0000 (UTC)",
"lastsuccess": "Tue Sep 02 2014 02:34:07 GMT+0000 (UTC)",
"stats": {
"retriedUrls": [],
"failedUrls": [],
"successful": 1,
"rows": 31,
"retried": 0,
"failed": 0,
"duration": 1894
},
"results": {
"rank": [
{
"division": "Wukong's Lancers Silver-tier II"
}
]
}
}
Here is the php code I am trying to use to get the division data, but I am getting nothing! :
<?php
$request = "https://www.kimonolabs.com/api/c6qj1oc?apikey=xxxxxxxxxxxxxxxxxx";
$response = file_get_contents($request);
$results = json_decode($response, TRUE);
$division = $results->{'results'}->{'rank'}->{'division'};
echo $division;
?>
What am I doing wrong here??