Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- $context = stream_context_create($opts);
- $usuario = $_POST['usuario'];
- $file = file_get_contents("https://todocodigos.000webhostapp.com/twitch/infotwitch.php?usuario=$usuario", false, $context);
- $image_data = json_decode($file, true);
- $twitch = json_decode($file, true);
- $news = json_decode($news, true);
- ?> <?php for ($i = 0; $i < count($image_data['info_twitch']); $i ++) {
- ?>
- <b>Espectadores:</b> => <?php echo $twitch['info_twitch'][$i]['Espectadores']; ?>
- <br>
- <b>Estado del streamer:</b> => <?php echo $twitch['info_twitch'][$i]['Estado'] ?>
- <br>
- <b>Categoria</b> => <?php echo $twitch['info_twitch'][$i]['categoria']?>
- <br>
- <b>Idioma del streamer</b> => <?php echo $twitch['info_twitch'][$i]['Idioma_del_streamer']?>
- <br>
- <b>Visualizaciones:</b> => <?php echo $twitch['info_twitch'][$i]['Visualizaciones_totales']?>
- <br>
- <b>Seguidores del canal:</b> =><?php echo $twitch['info_twitch'][$i]['Seguidores_del_canal']?>
- <br>
- <b>Logo del canal:</b> => <?php echo $twitch['info_twitch'][$i]['Logo_del_canal']?>
- <br>
- <b>Banner del video:</b> => <?php echo $twitch['info_twitch'][$i]['Banner_del_video']?>
- <br>
- <b>Banner del perfil:</b> => <?php echo $twitch['info_twitch'][$i]['Banner_del_perfil']?>
- <br>
- <b>Ultimo titulo:</b> => <?php echo $twitch['info_twitch'][$i]['Titulo_del_último_vídeo']?>
- <br>
- ******************************
- <br>
- <form action="" method="POST">
- <input type="text" size="50" name="usuario" id="usuario" placeholder="Escribe el nombre del streamer">
- <input type="submit" value="Ver info">
- </form>
- *****************************
- <br>
- <?php }?>
- <h3>API TWITCH:
- <br>
- <a href="https://pastebin.com/kn0HAAhu" target="_blank">api twitch</a>
- </h3>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement