I've never gotten this to work(Because I'm bad at sockets) but here's a really simple link that displays the uptime of a channel.

https://decapi.me/twitch/uptime?channel=CHANNELNAME

It makes a plain-text webpage that only contains the time that the channel has been live for.

It will either say
4 hours and 56 minutes
or
channelname is offline

So once you figure out how to read the sockets from decapi.me, you can format it however you like.