List of active streams using PHP & Twitch API

man, you’re awesome. it’s working now, but i have mentioned some strange things. if stream is online, but there is a picture background, script thinks its offline, also if stream is video. i mean its was written before and now its gone online. is it normal? or it can be fixed somehow?

and about Oath token - i tried to get it on my hostiing using console with this, but dont get it anyway( and what is this “scope” atrribute and which one i need?

POST https://id.twitch.tv/oauth2/token
    ?client_id=<your client ID>
    &client_secret=<your client secret>
    &grant_type=client_credentials
    &scope=<space-separated list of scopes>