• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 01:55
CEST 07:55
KST 14:55
  • 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 Flash9[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] Ro24 Preview Pt2: News Flash ASL21 General Discussion Gypsy to Korea How Can I Add Timer & APM Count? A cwal.gg Extension - Easily keep track of anyone
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: 8763 users

Twitch.tv custom stream list web module

Forum Index > TL Community
Post a Reply
Normal
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.
Maggi
Profile Joined September 2012
Germany3 Posts
June 30 2013 22:09 GMT
#21
i dont know how to get this work on our clanpage, can someone explain me how that works? we are using the cms dzcp and i saved the php file in the menu function folder and linked it i with [twichlist] in html. Its not working in this way for me, need help
:/
esuom
Profile Joined July 2013
United States5 Posts
July 06 2013 16:48 GMT
#22
Hey just wanted to say thanks for the script. I been hurting my brain trying to look for one or create one. I've tried a bunch of em but I got to say this was by far the easiest to work with! Here is your script implemented onto my gaming organizations website.

http://n2pgaming.com/streams.php

Nice work!
esuom
Profile Joined July 2013
United States5 Posts
July 20 2013 07:12 GMT
#23
hey if i wanted to add what game they play how do i do that
Th1rdEye
Profile Blog Joined December 2006
United States1074 Posts
July 20 2013 11:41 GMT
#24
Nice Going to be really cool asset for team sites and community sites etc!
from the days of: TheMarine [NC]...YellOw [H.O.T.]-Forever99 OgOgO [_MuMyung_] ChRh PlayGrrrr.... SlayerS_`BoxeR` [Oops]Reach [ReD]NaDa [DF]zergboy..!! Pusan[S.G] Nal_rA GARIMTO SSamJJang ChoJJa JinSu Silent_Control iloveoov H_PauL_WII JulyZerg [DaK]JoYo
lastzombie
Profile Joined February 2013
3 Posts
Last Edited: 2013-07-28 17:46:42
July 28 2013 17:41 GMT
#25
On July 07 2013 01:48 esuom wrote:
Hey just wanted to say thanks for the script. I been hurting my brain trying to look for one or create one. I've tried a bunch of em but I got to say this was by far the easiest to work with! Here is your script implemented onto my gaming organizations website.

http://n2pgaming.com/streams.php

Nice work!

Hey man your page looks so good =) This is the kind of thing i was looking for. Where can i contact LKFX esports design media and may i ask how much did they charge? Before contacting them i wanna be sure they are in my budget limit :D

edit: Are they still doing any work? İt seems their website is down and there is only deviant art :/
esuom
Profile Joined July 2013
United States5 Posts
August 10 2013 05:25 GMT
#26
On July 29 2013 02:41 lastzombie wrote:
Show nested quote +
On July 07 2013 01:48 esuom wrote:
Hey just wanted to say thanks for the script. I been hurting my brain trying to look for one or create one. I've tried a bunch of em but I got to say this was by far the easiest to work with! Here is your script implemented onto my gaming organizations website.

http://n2pgaming.com/streams.php

Nice work!

Hey man your page looks so good =) This is the kind of thing i was looking for. Where can i contact LKFX esports design media and may i ask how much did they charge? Before contacting them i wanna be sure they are in my budget limit :D

edit: Are they still doing any work? İt seems their website is down and there is only deviant art :/


Yea we got it a while ago, I don't think they do any work anymore. But can probably just take one off deviant art
esuom
Profile Joined July 2013
United States5 Posts
August 10 2013 05:32 GMT
#27
I can sell it to you if you like.
Janko
Profile Joined September 2010
Slovenia28 Posts
December 25 2013 13:07 GMT
#28
I noticed that the viewer counter is no longer working. Is there any way to fix it?
starcraft2.si
MrSmith777
Profile Joined February 2014
1 Post
February 25 2014 16:00 GMT
#29
Your sample Picture looks good! BUT the script is not working anymore... It only gives out an "403 Forbidden" Error. Is anybody able to fix that? Or any solution for that? Would be very nice...
Iksf
Profile Joined March 2011
United Kingdom444 Posts
April 24 2014 04:43 GMT
#30
On February 26 2014 01:00 MrSmith777 wrote:
Your sample Picture looks good! BUT the script is not working anymore... It only gives out an "403 Forbidden" Error. Is anybody able to fix that? Or any solution for that? Would be very nice...


Our clan site moved hosts il try get a message to avon to update the link.
esuom
Profile Joined July 2013
United States5 Posts
August 06 2014 05:56 GMT
#31
Hey I really loved using this script.. but justin.tv API just went down.. if you can update it using twitch api I would appreciate :D
TechNoTrance
Profile Joined May 2012
Canada1007 Posts
August 07 2014 20:49 GMT
#32
Yeah, love this script! Would be great if you could update it to twitch ^^
All we have to decide is what to do with the time that is given to us.
Harpic
Profile Joined August 2014
France1 Post
August 19 2014 17:06 GMT
#33
--- Nuked ---
FO-nTTaX
Profile Blog Joined January 2013
Johto4979 Posts
Last Edited: 2014-08-19 22:03:21
August 19 2014 21:59 GMT
#34
I put together a simple module for embedding stream lists on homepages.
It uses solely the twitch API and needs php on the server.

You can see it working here: http://w3studi.informatik.uni-stuttgart.de/~winkleax/twitch-stream-list/
The download is availiable from GitHub here: https://github.com/FO-nTTaX/twitch-stream-list

This is very basic, and you will have to integrate it into your homepage yourself, but i hope someone will find this helpful.

This is completely free, so have fun with it.
Administrator@FO_nTTaX | FO-nTTaX.de | 0xff0000.dev | Senior Lead Liquipedia Developer
"Nimm es. Es ist nicht viel, aber es kommt von Herzen. Vergiss mich nicht!"
AvonMexicola
Profile Joined November 2011
Netherlands36 Posts
October 13 2014 23:18 GMT
#35
Hey guys I actually updated everything to the new API. Sorry to wake a dead topic I will add new links soon.
Code is still a bit rough but thinking of adding some new cute features.
The Joomla version is way more advanced now. It has settings from the control panel for various options and supports hashd as well.
Life is unfair, kill yourself or get over it
AvonMexicola
Profile Joined November 2011
Netherlands36 Posts
Last Edited: 2014-10-13 23:27:10
October 13 2014 23:25 GMT
#36
Here is a link to the new Twitch api 2.0 channel switcher: LINK1
Here is a link to the zip file with the .php .css and images: LINK!

Here is a link to the fancy new joomla module: LINK!
Life is unfair, kill yourself or get over it
Zythus
Profile Joined December 2011
Poland184 Posts
Last Edited: 2015-07-24 10:42:38
July 24 2015 10:42 GMT
#37
I know it's a pretty old topic, but has anyone figured out how to get it to work? I mean, I don't want the channel switcher, all I need is stream list on a website. I tried to work with the last code from Avon, with that php file and with the code provided by Zumm (http://pastebin.com/vQJZ5r7C) by changing the API's from justin to twitch, and names of arrays and so on, but can't get it to work.
Streams show offline anyway. Any help? I know it's not a lot of code, but I wonder which part am I missing.
amazingxkcd
Profile Blog Joined September 2010
GRAND OLD AMERICA16375 Posts
July 24 2015 13:58 GMT
#38
On July 24 2015 19:42 Zythus wrote:
I know it's a pretty old topic, but has anyone figured out how to get it to work? I mean, I don't want the channel switcher, all I need is stream list on a website. I tried to work with the last code from Avon, with that php file and with the code provided by Zumm (http://pastebin.com/vQJZ5r7C) by changing the API's from justin to twitch, and names of arrays and so on, but can't get it to work.
Streams show offline anyway. Any help? I know it's not a lot of code, but I wonder which part am I missing.

https://github.com/justintv/twitch-api
The world is burning and you rather be on this terrible website discussing video games and your shallow feelings
quiki
Profile Joined January 2016
2 Posts
January 05 2016 14:02 GMT
#39
Great script! Loved it. When I click on a online streamer it only shows my website = not directly too a twitch page.
quiki
Profile Joined January 2016
2 Posts
January 05 2016 14:12 GMT
#40
Demo can be seen here: pcgamer.no
GoatyTV
Profile Joined June 2016
1 Post
June 08 2016 20:41 GMT
#41
Hey guys! Sorry to bump this thread, but I have a question for the guy who did the Channel Switcher, or anyone really that may know. The API, I am assuming, is out of date. But going through I don't actually see anything wrong. It says everyone is offline which isn't the case. I click the stream name it updates just fine showing the live feed. Any code savvy people see what might be incorrect?
Normal
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
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft563
Ketroc 43
Codebar 1
StarCraft: Brood War
Sea 6368
ggaemo 257
Backho 237
Hm[arnc] 77
sSak 60
910 45
Stork 41
Dota 2
NeuroSwarm170
League of Legends
JimRising 672
Counter-Strike
Stewie2K993
Other Games
C9.Mang0253
Mew2King74
ToD17
Organizations
Other Games
BasetradeTV128
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH261
• practicex 25
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1489
• Stunt370
Upcoming Events
RSL Revival
4h 5m
Maru vs MaxPax
BSL
13h 5m
RSL Revival
1d 1h
Cure vs Rogue
uThermal 2v2 Circuit
1d 8h
BSL
1d 13h
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
PGL Bucharest 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
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.