I'm using the twitch.tv API. I'm getting all the lives from "fifa17" and listing all the channel names that are doing this live with this game, the URL has 100 results limit ie 100 names, I made a for
to list all the names, for
shows 89 names and the rest of the missing names it the error Undefined offset: 89
<?php
$api2 = file_get_contents("https://api.twitch.tv/kraken/search/streams?client_id=g5ynk8n0llmefg9m70ruyg36bbt6si&query=fifa17&limit=100");
$defuse = json_decode($api2);
if($defuse == null){
echo "erro";
}else{
$total_lives=$defuse->_total;
echo "Toltal de Lives: ".$total_lives."</br>";
for($i=0;$i<=99;$i++)
echo $defuse->streams[$i]->channel->name."</br>";
}
?>