• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 20:16
CEST 02:16
KST 09:16
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL21] Ro24 Preview Pt2: News Flash8[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy16ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book20
Community News
Weekly Cups (March 23-29): herO takes triple6Aligulac acquired by REPLAYMAN.com/Stego Research8Weekly Cups (March 16-22): herO doubles, Cure surprises3Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool49Weekly Cups (March 9-15): herO, Clem, ByuN win4
StarCraft 2
General
What mix of new & old maps do you want in the next ladder pool? (SC2) Team Liquid Map Contest #22 - Presented by Monster Energy Aligulac acquired by REPLAYMAN.com/Stego Research Weekly Cups (March 23-29): herO takes triple herO wins SC2 All-Star Invitational
Tourneys
RSL Season 4 announced for March-April Sparkling Tuna Cup - Weekly Open Tournament StarCraft Evolution League (SC Evo Biweekly) WardiTV Mondays World University TeamLeague (500$+) | Signups Open
Strategy
Custom Maps
[M] (2) Frigid Storage Publishing has been re-enabled! [Feb 24th 2026]
External Content
Mutation # 519 Inner Power The PondCast: SC2 News & Results Mutation # 518 Radiation Zone Mutation # 517 Distant Threat
Brood War
General
ASL21 General Discussion Gypsy to Korea How Can I Add Timer & APM Count? A cwal.gg Extension - Easily keep track of anyone BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[ASL21] Ro24 Group F [ASL21] Ro24 Group E Azhi's Colosseum - Foreign KCM Escore Tournament StarCraft Season 2
Strategy
Fighting Spirit mining rates What's the deal with APM & what's its true value Simple Questions, Simple Answers
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Starcraft Tabletop Miniature Game General RTS Discussion Thread Darkest Dungeon
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread The Games Industry And ATVI European Politico-economics QA Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread General nutrition recommendations
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Funny Nicknames
LUCKY_NOOB
Money Laundering In Video Ga…
TrAiDoS
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 10069 users

Twitch.tv custom stream list web module

Forum Index > TL Community
Post a Reply
1 2 3 Next All
AvonMexicola
Profile Joined November 2011
Netherlands36 Posts
Last Edited: 2013-05-09 14:10:15
December 26 2012 04:27 GMT
#1
Hi there,

UPDATE:
I got a LOT of questions about the TwitchList channel switcher I created for my website www.maegis.net. I created a standalone code that can be easily integrated into any website with minimal html skills. You can find an example site of the "as is" code at http://www.maegis.net/twitchlist/. To download the code + images in a convenient zipfile go to this link zipfile

Abstract
With this topic I want to introduce to the team liquid community, a script that generates a stream list for your website composed of stream channels selected by you. The required files can be downloaded from links below.

Background
This last week I have been working on my new teams website and decided that I wanted to have a custom stream-list module to tell if any of our teams members where currently streaming. Sadly I discovered there were no such modules available and the pieces of code I did find where ridiculously slow.

the script
So I decided to create my own script and now that it is working I want to make it available for other teams that want one on their website.

So what does the script do?
It checks a custom list of twitch channel names for being off or online. If a channel is found to be online the title is showed as well as the amount of viewers watching the stream.
Here is an image of it working on my joomla based team site. www.maegis.net.
[image loading]

For now the script comes in 2 forms, as a single php file with some images that anyone should be able to incorporate to their site and as a joomla module.

The php file
To make the script file work the following line must be edited to check the twitch channels of your choosing.
members = array("maegis","androide456","avonmexicola","iksf"); the names between "" are all twitch tv stream channel (i.e. http://www.twitch.tv/maegis ). Simply add the channels names of your choosing separated by a comma and the script should do the rest.

the Joomla module
The joomla module is version 2.5 compatible and can be installed using the joomla back-end admin panel. From here navigate to Extensions -> Extension manager and choose upload package file. Select the mod_twitchlist.zip file and press upload. After a successful installation go to Extensions -> Module Manager and enable the Twitch List module. Click on the Twitch link to configure it. Make sure you add a position and assign the module to some of your pages. Under basic options you can add the user list. This list is once again a comma separated list of twitch channels (i.e. eg_idra,rootcatz,liquidhero ) make sure not to use spaces. The module should now appear and function on your joomla website.

Download locations
For now both zip files can be downloaded from my website.
You can get the joomla module here
and the php script file + images here

Future plans and development
This is of course still a very early version of the script. I intend to develop a full component that can fill an entire page featuring thumbnails and viewers in a next release. If meanwhile you have any suggestions for features please post them in this topic and I'll see what I can do. I hope some of you will enjoy using this module as much as I enjoyed making it.

Cheers,

Avon
Life is unfair, kill yourself or get over it
Iksf
Profile Joined March 2011
United Kingdom444 Posts
December 26 2012 19:20 GMT
#2
I can confirm this is awesome
vali
Profile Joined May 2010
Netherlands59 Posts
December 26 2012 20:21 GMT
#3
I can confirm this is reasonably well done
Death by a tank
PhilipCottam
Profile Joined December 2012
United States1 Post
December 27 2012 05:34 GMT
#4
--- Nuked ---
lordofsoup
Profile Joined January 2012
United States159 Posts
Last Edited: 2012-12-27 16:08:22
December 27 2012 16:07 GMT
#5
Looks sweet, how long it take to make?
NOHUNTERS
WillS
Profile Joined September 2011
61 Posts
December 28 2012 15:34 GMT
#6
That's awesome! Make sure that you check whether the cURL extension (http://php.net/manual/en/book.curl.php) is available because file_get_contents won't work on a lot of shared hosts because they generally turn (http://php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen) off.
AvonMexicola
Profile Joined November 2011
Netherlands36 Posts
December 28 2012 22:50 GMT
#7
On December 29 2012 00:34 WillS wrote:
That's awesome! Make sure that you check whether the cURL extension (http://php.net/manual/en/book.curl.php) is available because file_get_contents won't work on a lot of shared hosts because they generally turn (http://php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen) off.


I believe this function is only used in the joomla mod, for getting the list of channel users from twitch (for joomla to funtion this function has to be available). The none joomla script requires you to add this list into the twitch_list.php yourself.
Life is unfair, kill yourself or get over it
AvonMexicola
Profile Joined November 2011
Netherlands36 Posts
December 28 2012 22:59 GMT
#8
On December 28 2012 01:07 lordofsoup wrote:
Looks sweet, how long it take to make?


Since it was the first time I ever tried coding anything in PHP.. a week lol.
I went from ~700 lines back to ~70 hahaha.
Life is unfair, kill yourself or get over it
Zumm
Profile Blog Joined September 2010
Germany122 Posts
Last Edited: 2012-12-30 15:01:34
December 30 2012 14:09 GMT
#9
I think you can refactor quite a bit in your code, when it comes to readability.
I didn't check the Joomla code since I'm not familiar with any functions concerning Joomla, but I saw some things that had me wondering in the normal PHP code.

You don't need to initialize the counter variable in every foreach loop if you don't use it. By standard it always uses the $value variable. Try to name the $value in a fashion so everyone knows what is in the value, just by looking at the loop.
Also since $i and $value are both loop variables you don't need to unset them after your loop is finished (not really a mistake, but it reduces the lines used)

Those are just two things I just saw looking at the code in editor, maybe I can give you some more advice later today

But all in all I like the idea and the code is really good for your first PHP code :D

**EDIT**

I refactored the code a bit and changed/deleted some functions (used in_array instead of two foreach loops)
You can look at it here:
http://pastebin.com/vQJZ5r7C

Hope it is okay
AvonMexicola
Profile Joined November 2011
Netherlands36 Posts
January 02 2013 23:09 GMT
#10
Cool thanks, I will have a look
Life is unfair, kill yourself or get over it
Janko
Profile Joined September 2010
Slovenia28 Posts
March 15 2013 19:31 GMT
#11
Much thanks for releasing this! I'm using it on Slovenian community forum, and it's great.
starcraft2.si
[HB]Mess
Profile Joined May 2010
Denmark37 Posts
March 25 2013 09:15 GMT
#12
Cool! Thanks for sharing.
Shit, I woke up...
Ginshen
Profile Joined May 2013
United States1 Post
May 03 2013 19:21 GMT
#13
Awesome, been what I have been looking for. Mind releasing the code that you have on your website, or a walkthrough? I am using the joomla module, but I want the stream links to link to my own internal page where it passes the user variable into an iframe of sorts.

Thanks!
Ronagan
Profile Joined December 2012
Austria1 Post
May 08 2013 07:58 GMT
#14
Hi. Thx for the Code. But can someone help me. I want to integrate in the streamlist also hashd.tv streams. I try everythink but it doesnt work. PLS help.

Thx Ronagan
AvonMexicola
Profile Joined November 2011
Netherlands36 Posts
May 09 2013 14:13 GMT
#15
Hi people, I got a lot of pm's about the stream list thingie located at www.maegis.net.SO i created the following update to the topic:

UPDATE:
I got a LOT of questions about the TwitchList channel switcher I created for my website www.maegis.net. I created a standalone code that can be easily integrated into any website with minimal html skills. You can find an example site of the "as is" code at http://www.maegis.net/twitchlist/. To download the code + images in a convenient zipfile go to this link zipfile

@Ronagan
Please see if that code helps you!
Life is unfair, kill yourself or get over it
Khevy
Profile Joined May 2013
Philippines4 Posts
May 26 2013 07:57 GMT
#16
Is this available to Blogger.com?

There is Widget > HTML / Javascript there

I was really looking for such thing.
LIVE for nothing or DIE for something
Zumm
Profile Blog Joined September 2010
Germany122 Posts
Last Edited: 2013-05-26 13:04:31
May 26 2013 13:03 GMT
#17
Surprised to see that you didn't use my refactored version up until now, since it's much cleaner and has about 50 lines less code.

@Ronagan
hasd.tv uses pretty much the same API as twitch.tv does, you just need to change some indeces when filling your arrays and checking the return array.
And you need to check every channel by its own, since you can't hand over a list of channels.
AvonMexicola
Profile Joined November 2011
Netherlands36 Posts
May 29 2013 02:07 GMT
#18
On May 26 2013 22:03 Zumm wrote:
Surprised to see that you didn't use my refactored version up until now, since it's much cleaner and has about 50 lines less code.

@Ronagan
hasd.tv uses pretty much the same API as twitch.tv does, you just need to change some indeces when filling your arrays and checking the return array.
And you need to check every channel by its own, since you can't hand over a list of channels.


I tried using your version, but did not get it to work!.. therefore I simply went back to what did work.
Life is unfair, kill yourself or get over it
ovvner
Profile Joined June 2013
1 Post
June 07 2013 18:35 GMT
#19
this script doesnt work.Is any possible to add on page automatcaly online streams from directory League of Legends?I mean streams not their status.Wordpress or Joomla or whatever.
EthanML
Profile Joined May 2011
Northern Ireland55 Posts
June 22 2013 16:35 GMT
#20
Just what I was looking for, about to try it on Joomla now, thanks man.
1 2 3 Next All
Please log in or register to reply.
Live Events Refresh
The PiG Daily
21:00
Best Games of SC
Reynor vs Zoun
SHIN vs ByuN
herO vs sOs
Maru vs SHIN
Clem vs Bunny
PiGStarcraft607
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft607
SpeCial 146
StarCraft: Brood War
firebathero 160
Backho 118
910 41
ggaemo 8
Dota 2
monkeys_forever660
Counter-Strike
taco 445
Other Games
summit1g8515
tarik_tv4757
shahzam476
C9.Mang0223
ProTech119
Fuzer 110
Mew2King60
PPMD31
ViBE17
Liquid`Ken8
Organizations
Other Games
gamesdonequick728
BasetradeTV93
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• Hupsaiya 72
• musti20045 68
• RyuSc2 40
• davetesta16
• HeavenSC 6
• sooper7s
• intothetv
• Kozan
• AfreecaTV YouTube
• IndyKCrew
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• blackmanpl 39
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Other Games
• imaqtpie1005
Upcoming Events
RSL Revival
9h 44m
Maru vs MaxPax
BSL
18h 44m
RSL Revival
1d 6h
Cure vs Rogue
uThermal 2v2 Circuit
1d 13h
BSL
1d 18h
Afreeca Starleague
2 days
Wardi Open
2 days
Replay Cast
2 days
Sparkling Tuna Cup
3 days
Kung Fu Cup
4 days
[ Show More ]
The PondCast
5 days
Replay Cast
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Escore Tournament S2: W1
WardiTV Winter 2026
NationLESS Cup

Ongoing

BSL Season 22
CSL Elite League 2026
ASL Season 21
CSL Season 20: Qualifier 2
StarCraft2 Community Team League 2026 Spring
RSL Revival: Season 4
Nations Cup 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026

Upcoming

CSL 2026 SPRING (S20)
IPSL Spring 2026
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.