Help with Stream update - Twitch Api

I have other php file. I think is here. Streams.php .

<?php if( isset( $_GET['streamID'] ) ) $streamID = $_GET['streamID']; else $streamID = ''; if($streamID) { $stream=safe_query("SELECT * FROM ".PREFIX."streams WHERE streamID='".$streamID."'"); while($ds=mysql_fetch_array($stream)) { $streamID = $ds['streamID']; $channel = $ds['channel']; $title = $ds['title']; $type = $ds['type']; $status = $ds['status']; $viewers = $ds['viewers']; $thumb = $ds['thumb']; $chat = $ds['chat']; if($type == 1) $type_banner = ''; elseif($type == 2) $type_banner = ''; if($type == 1) $chatz = '
'; elseif($type == 2) $chatz = '
'; // Advertising $allbanner = safe_query("SELECT * FROM ".PREFIX."bannerrotation WHERE displayed='1' AND bannertype='4' ORDER BY RAND() LIMIT 0,1"); $total = mysql_num_rows($allbanner); if($total) { $banner = mysql_fetch_array($allbanner); $pub = '
'.htmlspecialchars($banner['bannername']).'
'; } else $pub = ''; eval("\$title_stream = \"".gettemplate("stream_header")."\";"); echo $title_stream; if($type == 1) echo '
'.$pub.''; elseif($type == 2) echo '
'.$pub.''; eval("\$title_stream = \"".gettemplate("stream_bottom")."\";"); echo $title_stream; } } else { $featured=safe_query("SELECT * FROM ".PREFIX."streams WHERE displayed='1' AND status='1' AND featured='1' ORDER BY viewers DESC"); if(mysql_num_rows($featured)) { eval("\$title_streams = \"".gettemplate("streams_featured_header")."\";"); echo $title_streams; echo '
    '; while($ds=mysql_fetch_array($featured)) { $streamID = $ds['streamID']; $title = $ds['title']; $info = $ds['info']; $type = $ds['type']; $channel = $ds['channel']; $status = $ds['status']; $viewers = $ds['viewers']; $thumb = $ds['thumb']; $game = mysql_fetch_array(safe_query("SELECT tag FROM ".PREFIX."games WHERE gameID = '".$ds['gameID']."' LIMIT 0,1")); $game = $game['tag']; $country = mysql_fetch_array(safe_query("SELECT short FROM ".PREFIX."countries WHERE countryID = '".$ds['countryID']."' LIMIT 0,1")); $country = ''; if($type == 1) $type_img = ''; elseif($type == 2) $type_img = ''; echo '
  • '.$country.''.$title.' '.$info.' '.$viewers.' '.$type_img.'
  • '; } echo '
'; eval("\$title_streams = \"".gettemplate("streams_featured_bottom")."\";"); echo $title_streams; } eval("\$title_streams = \"".gettemplate("streams_header")."\";"); echo $title_streams; echo '
    '; $streams=safe_query("SELECT * FROM ".PREFIX."streams WHERE displayed='1' AND status='1' AND featured='0' ORDER BY viewers DESC"); if(mysql_num_rows($streams)) { while($ds=mysql_fetch_array($streams)) { $streamID = $ds['streamID']; $title = $ds['title']; $info = $ds['info']; $type = $ds['type']; $channel = $ds['channel']; $status = $ds['status']; $viewers = $ds['viewers']; $thumb = $ds['thumb']; $game = mysql_fetch_array(safe_query("SELECT tag FROM ".PREFIX."games WHERE gameID = '".$ds['gameID']."' LIMIT 0,1")); $game = $game['tag']; $country = mysql_fetch_array(safe_query("SELECT short FROM ".PREFIX."countries WHERE countryID = '".$ds['countryID']."' LIMIT 0,1")); $country = ''; if($type == 1) $type_img = ''; elseif($type == 2) $type_img = ''; echo '
  • '.$country.''.$title.' '.$info.' '.$viewers.' '.$type_img.'
  • '; } } else echo '
    No Streams Available.
    '; echo '
'; eval("\$title_streams = \"".gettemplate("streams_bottom")."\";"); echo $title_streams; } ?>