• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 02:25
CET 08:25
KST 16:25
  • 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
Team Liquid Map Contest #2312[ASL22] Finals Preview: Sweet Victory!12[ASL22] Ro4 Preview: Mirror Mirror6[ASL22] Ro8 Preview: Within Reach5[ASL22] Ro8 Preview: In A Tizzy11
Community News
BSL 2v2 ProLeague Season 40Weekly Cups (Nov 9-15): Clem and herO take over6Dark completes military service, returns to SC217[BSL23] RO16 Group Stage20Weekly Cups (Nov 2-8): herO back on top?2
StarCraft 2
General
Weekly Cups (Nov 9-15): Clem and herO take over SC4ALL: II Indiegogo Campaign Announcement No more SC2 streamers on team liquid? Team Liquid Map Contest #23 StarCraft open world shooter announced at BlizzCon
Tourneys
RSL goes to London! 2026 Offline Finals Nov 21-22 soO & FanTaSy return! SC2 Kevin Scrim 4v4 (Nov 16) Sparkling Tuna Cup - Weekly Open Tournament Sea Duckling Open (Global, Bronze-Diamond) Dark returns! GSL CK #7 4v4 Team Battle (Nov 19)
Strategy
[H] ZvP Mid-Late Game: Stalkers Collossi HT
Custom Maps
[G] How to playtest arcade maps Starcraft 2 Advance [D] the control group Simple Questions/Answers
External Content
Mutation # 553 Undermined The PondCast: SC2 News & Results Mutation # 552 Secret Storm Mutation # 551 Robotic Revival
Brood War
General
NaDa's Body BW General Discussion People still play BW? BGH Auto Balance -> http://bghmmr.eu/ List of top players active on ShieldBattery
Tourneys
BSL 2v2 ProLeague Season 4 2v2v2v2 Tournament Stage 2: Players $3,000 Sijosae Tier 2,3,4 Cup (Nov 23-24 2026) [BSL23] Ro16 Group B - Saturday 21:00 CET
Strategy
Pluto's TvP 5Marine 2Medic Push Simple Questions, Simple Answers Infested Terran strategies in 2026 Nuke strategy worked in K-League 2026-11-09
Other Games
General Games
Nintendo Switch Thread The PlayStation 5 Stormgate/Frost Giant Megathread Warcraft III: The Frozen Throne Free Space RTS Game, optimised f. Phone/Tablet etc
Dota 2
League of Legends
[TL LoL EUW IHs] Teemo shall perish
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread The Games Industry And ATVI Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Trading/Investing Thread
Fan Clubs
Fan Club Resource Thread Reynor Fan Club The Flash Fan Club
Media & Entertainment
Anime Discussion Thread Movie Discussion!
Sports
Formula 1 Discussion Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
The time I organised my…
AssyrianKing
Why I built Repalyzer (1.1.…
BlueStar
Innovate or Game Over?
TrAiDoS
ShieldBattery on Mac
Kraekkling
Can Bots Beat Pros?? Starcr…
namkraft
James Bond movies ranking - pa…
Topin
StarCraft improvement
iopq
Socialism Anyone?
GreenHorizons
Customize Sidebar...

Website Feedback

Closed Threads



Active: 13483 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
Next event in 35m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SortOf 88
StarCraft: Brood War
Pusan 250
Movie 148
sSak 123
Hyuk 117
Shine 60
Mong 49
scan(afreeca) 24
yabsab 21
Noble 18
zelot 5
[ Show more ]
Force[name] 4
Super Smash Bros
amsayoshi45
Other Games
summit1g11757
JimRising 492
Happy169
Livibee122
RuFF_SC283
Mew2King54
Organizations
Other Games
gamesdonequick731
[ Show 11 non-featured ]
StarCraft 2
• Light_VIP 19
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota2293
League of Legends
• Rush1202
Upcoming Events
Tournament
35m
WardiTV Weekly
4h 35m
Ultimate Battle
4h 35m
Bisu vs Light
Kung Fu Cup
1d 3h
Solar vs Classic
ByuN vs SHIN
PiGosaur Cup
1d 17h
Kung Fu Cup
2 days
Clem vs Rogue
herO vs Percival
The PondCast
3 days
KCM Race Survival
3 days
Kung Fu Cup
3 days
Kung Fu Cup
4 days
[ Show More ]
Kung Fu Cup
5 days
Kung Fu Cup
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-11-17
RSL Offline Finals
Underdog Cup 2026 Div 2-3

Ongoing

Acropolis #5
KCM Race Survival 2026 Season 4
International ShieldBattery League
BSL Season 23
IPSL Winter 2026-27
CSL Season 23: Qualifier 1
Sector 591
Sijosae Cup
Calamity Cup Div. A Season 8
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
PGL Masters Bucharest 2026
Stake Ranked Episode 5
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #3

Upcoming

CSL Season 23: Qualifier 2
YSL S4
SC4ALL II: Brood War
CSL 2026 Winter (S23) - 3v3
CSL 2026 Winter (S23)
NBSL 2026 Xiamen LAN
BSL 23: Non-Korean Championship
HSC XXX
Stellar Fest 2: Lunar Cup
StarCraft2 Weekly Open Tournament 2026 Grand Finals
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
IEM Kraków 2027
PGL Bucharest 2027
BLAST Bounty Winter 2027
PGL Major Singapore 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.