I’ll point to my previous post about learning how to use cURL and the two learning resources: PHP The Right Way and the PHP class on CodeAcademy. You could also try r/phphelp on reddit. Once you understand the language and its capabilities, you should easily be able to accomplish what you need.
If you have specific questions about the Twitch API, feel free to post those to get help.