Twitch API Bugged...?

You currently have a few streams marked as “live” on your site that aren’t live. All of their data matches the current top stream - Riotgames. This, plus the code you shared, makes me think that in some cases $stream_info['name'] is blank, causing your query to our API to return not one stream object, but all available streams. Then you blindly grab the top stream and run your update query that blindly the database… potentially hitting every row since you don’t escape your variables?

If I had unredacted code I could MAYBE try to guess at the bug, but I’ve very confident that the issue is either in how you’re calling our API, how you’re updating the database, or both. Possible values of $stream_info['name'] would also help.