• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 18:32
CEST 00:32
KST 07:32
  • 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
Maestros of the Game: Week 1/Play-in Preview5[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy9
Community News
Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris35Weekly Cups (Aug 11-17): MaxPax triples again!13Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195
StarCraft 2
General
#1: Maru - Greatest Players of All Time Maestros of the Game: Week 1/Play-in Preview Greatest Players of All Time: 2025 Update BoxeR's Wings Episode 2 - Fan Translation A Eulogy for the Six Pool
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris LiuLi Cup - August 2025 Tournaments $5,000 WardiTV Summer Championship 2025 $5,100+ SEL Season 2 Championship (SC: Evo) Esports World Cup 2025
Strategy
Custom Maps
External Content
Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ Post ASL20 Ro24 discussion. Easiest luckies way to get out of Asl groups BW General Discussion No Rain in ASL20?
Tourneys
Cosmonarchy Pro Showmatches [ASL20] Ro24 Group F [IPSL] CSLAN Review and CSLPRO Reimagined! [ASL20] Ro24 Group E
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Path of Exile General RTS Discussion Thread Mechabellum Nintendo Switch Thread Stormgate/Frost Giant Megathread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread YouTube Thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s) Gtx660 graphics card replacement
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
Lemme tell you a thing o…
JoinTheRain
How Culture and Conflict Imp…
TrAiDoS
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 959 users

[PHP] Chat log link filter

Blogs > quirinus
Post a Reply
quirinus
Profile Blog Joined May 2007
Croatia2489 Posts
Last Edited: 2013-06-08 07:53:03
June 08 2013 07:29 GMT
#1
This PHP script allows you to load a file and it reads line by line to filters out links. I decided to post it here just in case someone needs something like this.

This was something I wanted to make for a long time, but didn't have the time and motivation to do it until now.
I made this specifically to log links from RollPlay live chat so I can watch it in peace instead of having to click every link to see it before it's lost (there's a lot of hilarious pictures). I'm archiving the pictures and links for the nostalgia value and to help people who can't watch live to have some taste of the gems and atmosphere from the chat.
If anyone wants to help log itmejp's channel during RollPlay that would be awesome in case I get disconnected or unable to do it. (Later we could even get complete VODs+chat with that; yes, I know someone else is doing it already - the more the merrier.)

I probably won't be updating this script for a while, if ever.



Features:
  • It will show the time when the link first appeared; next to it is the number of times it was written in chat.
  • It allows you to copy all the links at once (without timestamps) and you can click on them to check them.
  • For longer chat sessions, I suggest turning on Show sessions when loading a log file so you can see when disconnects happen.
  • If there's some timezone/time mismatch, you can manually write your timezone.

Screenshot:

[image loading]


Code:

Pastebin raw text link

It's very ineffective, not optimized, very badly structured and not commented, but it does what I need it to, without any problem.



Settings:

Note that this script was written mostly with mIRC in mind. I assume other IRC programs behave similarly, so you can use them as well if they can format log files similarly. The .log file text formatting I used was:
+ Show Spoiler +
It assumes that the message format is: [time] <nickname> Message
Message time stamps should be Fri, 07 Jun 2013 13:45:54 +0200, but I think others would work as well, especially if sessions are formatted in the same way.
Session start should be indicated by Session Start: in the line, followed by a time stamp like above.
Session end should use Session Close:, followed by a time stamp as well.


mIRC settings that will allow you to log and filter the chat links:
+ Show Spoiler +
Tools -> Options -> IRC -> Logging -> [checked] Timestamp logs: [ddd, dd mmm yyyy HH:nn:ss zz]

Tools -> Options -> Connect -> Nickname -> your_twitch_account_name (case sensitive)
Tools -> Options -> Connect -> Alternative-> your_twitch_account_name
Tools -> Options -> Connect -> Servers -> Add:
Description: Twitch.tv
IRC Server: your_account_name.jtvirc.com
Port: 6667
Group: Twitch.tv
Password: your_account_password

Then select it on the list and click the Select button.
Click Connect. (in the future, you can connect by clicking the thunderbolt button on the top left)

Once connected type /j channel_name to join a channel and stay in to keep logging it.

If you can't connect to the server (happens often), just keep trying, or add another server:
Description: Twitch.tv IP
IRC Server: 199.9.250.229
Port: 6667
Group: Twitch.tv
Password: your_account_password

And follow the same steps.

My log file folder is in: C:\Users\My_Name\AppData\Roaming\mIRC
You can find yours by going to: Tools -> Options -> IRC -> Logging -> Logs and buffer saves folder button.

  • If you're renaming the file, don't forget to change the name in the line $self_path = "links.php"; at the start as well.
  • If you want, you can choose a default timezone by un-commenting the line that contains $timezone_override and writing your timezone instead of Europe/Zagreb. (You can see the timezones list here.)



I suggest clearing the log every time you have a new link-recording-session so things don't get mixed up or just manually copy the sessions you need to a new file/folder - it's not necessary, but it will probably help you a lot with big logs.

Have fun!

All candles lit within him, and there was purity. | First auto-promoted BW LP editor.
quirinus
Profile Blog Joined May 2007
Croatia2489 Posts
Last Edited: 2013-06-11 07:04:48
June 08 2013 07:33 GMT
#2
I'm not sure if this is supposed to be posted in blogs or normal forum, so I decided to post it here as it's less obtrusive and belongs to a small niche.

edit: eh seems TL removes backslashes, I guess I'll link the code from somewhere else, brb.
edit2: fixed a few mistakes, should work as intended now
All candles lit within him, and there was purity. | First auto-promoted BW LP editor.
Please log in or register to reply.
Live Events Refresh
Next event in 13h 28m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nathanias 150
Livibee 82
StarCraft: Brood War
Shuttle 367
sSak 129
Dota 2
capcasts296
League of Legends
JimRising 436
Counter-Strike
fl0m1629
Stewie2K668
flusha230
Super Smash Bros
AZ_Axe63
Other Games
tarik_tv25436
gofns15884
summit1g7608
FrodaN2744
Grubby2496
KnowMe233
Organizations
Other Games
gamesdonequick1578
BasetradeTV12
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• davetesta65
• musti20045 44
• IndyKCrew
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Kozan
• Migwel
StarCraft: Brood War
• iopq 7
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota22484
• Ler73
League of Legends
• Doublelift5175
Counter-Strike
• imaqtpie949
• Shiphtur114
Upcoming Events
SC Evo League
13h 28m
Maestros of the Game
17h 28m
SHIN vs Creator
Astrea vs Lambo
Bunny vs SKillous
HeRoMaRinE vs TriGGeR
BSL Team Wars
20h 28m
Team Bonyth vs Team Sziky
BSL Team Wars
20h 28m
Team Dewalt vs Team Sziky
Afreeca Starleague
1d 11h
Soulkey vs BeSt
Snow vs Light
Monday Night Weeklies
1d 17h
Replay Cast
2 days
Sparkling Tuna Cup
2 days
PiGosaur Monday
3 days
LiuLi Cup
3 days
[ Show More ]
Replay Cast
4 days
The PondCast
4 days
RSL Revival
4 days
Maru vs SHIN
MaNa vs MaxPax
RSL Revival
5 days
Reynor vs Astrea
Classic vs sOs
BSL Team Wars
5 days
Team Bonyth vs Team Dewalt
CranKy Ducklings
6 days
RSL Revival
6 days
GuMiho vs Cham
ByuN vs TriGGeR
Cosmonarchy
6 days
TriGGeR vs YoungYakov
YoungYakov vs HonMonO
HonMonO vs TriGGeR
[BSL 2025] Weekly
6 days
Liquipedia Results

Completed

Acropolis #4 - TS1
WardiTV Summer 2025
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL Season 18: Qualifier 2
Maestros of the Game
SEL Season 2 Championship
Sisters' Call Cup
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSL 2025 AUTUMN (S18)
LASL Season 20
2025 Chongqing Offline CUP
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
EC S1
BLAST Rivals Fall 2025
Skyesports Masters 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
ESL Pro League S22
FISSURE Playground #2
BLAST Open Fall 2025
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 © 2025 TLnet. All Rights Reserved.