1
I’m using the Twitch.tv. I’m getting all the Lives by "fifa17" and listing all the channel names that are doing this live with this game, in the URL has the limit of 100 results ie 100 names, I made a for
to list all the names, the for
shows 89 names and rest of the missing names it gives 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>";
}
?>
Our partner thank you so much for the help worked out here and also thank you for the explanation that God bless you.
– Thainan Esteves