Jump to content

Using Kimono api data in php


MilliR

Recommended Posts

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??

Link to comment
https://forums.phpfreaks.com/topic/290791-using-kimono-api-data-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.