• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 14:19
CET 20:19
KST 04:19
  • 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
RSL Revival - 2025 Season Finals Preview7RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3
StarCraft 2
General
RSL Revival - 2025 Season Finals Preview Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced
Tourneys
RSL Offline Finals Info - Dec 13 and 14! Tenacious Turtle Tussle 2025 RSL Offline Finals Dates + Ticket Sales! Sparkling Tuna Cup - Weekly Open Tournament StarCraft2.fi 15th Anniversary Cup
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 504 Retribution Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ [BSL21] RO8 Bracket & Prediction Contest BW General Discussion FlaSh on: Biggest Problem With SnOw's Playstyle Let's talk about Metropolis
Tourneys
[ASL20] Grand Finals [BSL21] RO8 - Day 2 - Sunday 21:00 CET [BSL21] RO8 - Day 1 - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers Game Theory for Starcraft Fighting Spirit mining rates Current Meta
Other Games
General Games
Dawn of War IV Path of Exile Stormgate/Frost Giant Megathread Awesome Games Done Quick 2026! Nintendo Switch Thread
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread YouTube Thread European Politico-economics QA Mega-thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
TL+ Announced Where to ask questions and add stream?
Blogs
How Sleep Deprivation Affect…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1743 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 41m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 385
IndyStarCraft 170
JuggernautJason128
StarCraft: Brood War
Britney 19891
Calm 2879
Shuttle 440
Mini 394
EffOrt 229
Dewaltoss 118
ggaemo 87
Oya187 34
Dota 2
Gorgc6177
qojqva2871
LuMiX1
Counter-Strike
fl0m10563
byalli506
chrisJcsgo45
Super Smash Bros
hungrybox224
Heroes of the Storm
Khaldor625
Liquid`Hasu449
Other Games
Beastyqt631
ArmadaUGS126
XaKoH 84
OptimusSC21
Organizations
Other Games
gamesdonequick1110
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• HeavenSC 47
• Adnapsc2 17
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV395
League of Legends
• Nemesis2744
Other Games
• imaqtpie1845
• Shiphtur726
Upcoming Events
IPSL
41m
Sziky vs JDConan
BSL 21
41m
Tech vs Cross
Bonyth vs eOnzErG
Replay Cast
13h 41m
Wardi Open
16h 41m
Monday Night Weeklies
21h 41m
Sparkling Tuna Cup
1d 14h
Replay Cast
3 days
The PondCast
3 days
CranKy Ducklings
5 days
SC Evo League
5 days
[ Show More ]
BSL 21
6 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Acropolis #4 - TS3
RSL Revival: Season 3
Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
Slon Tour Season 2
WardiTV 2025
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22

Upcoming

CSL 2025 WINTER (S19)
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 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.