https://api.twitch.tv/kraken/channels/STREAM_NAME

Those things are in that link. You need to copy paste the text into a JSON viewer to see what the key names are.

Then you use jsonopen on the url and you can get the values with $json(handle,key)