• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 07:13
CET 13:13
KST 21:13
  • 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 Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation12Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview [TLMC] Fall/Winter 2025 Ladder Map Rotation TL.net Map Contest #21: Winners
Tourneys
RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle BW General Discussion What happened to TvZ on Retro? Brood War web app to calculate unit interactions [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
PvZ map balance Current Meta Simple Questions, Simple Answers How to stay on top of macro?
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread Clair Obscur - Expedition 33 Beyond All Reason
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread Artificial Intelligence Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2230 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
Kung Fu Cup
12:00
2025 Monthly #3: Day 4
Cure vs Reynor
Classic vs herO
RotterdaM385
IntoTheiNu 46
SteadfastSC18
Liquipedia
RSL Revival
10:00
Group C
SHIN vs ByuN
Crank 1212
Tasteless862
ComeBackTV 797
IndyStarCraft 179
Rex125
3DClanTV 66
Liquipedia
CranKy Ducklings
10:00
Master Swan Open #98
CranKy Ducklings41
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Crank 1212
Tasteless 862
RotterdaM 385
IndyStarCraft 179
Rex 125
Reynor 117
Railgan 37
SteadfastSC 18
StarCraft: Brood War
Britney 35036
Rain 3915
Horang2 1416
Hyuk 1361
firebathero 1294
Jaedong 836
Shuttle 589
Mini 431
Stork 338
BeSt 328
[ Show more ]
Last 223
PianO 177
Hm[arnc] 161
Leta 160
EffOrt 149
Shine 123
Pusan 120
Mong 92
Hyun 83
sorry 70
Shinee 67
Barracks 64
ggaemo 54
JYJ43
JulyZerg 32
soO 27
Movie 17
Bale 16
Noble 15
HiyA 12
ajuk12(nOOB) 8
Dota 2
Gorgc4605
singsing2226
XaKoH 424
XcaliburYe240
Dendi126
Counter-Strike
fl0m3292
zeus359
Other Games
FrodaN4576
B2W.Neo1686
KnowMe209
Fuzer 174
Lowko100
Mew2King57
MindelVK9
Organizations
Dota 2
PGL Dota 2 - Main Stream7428
PGL Dota 2 - Secondary Stream1548
Other Games
gamesdonequick592
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH141
• Adnapsc2 6
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 957
League of Legends
• Stunt1261
Upcoming Events
IPSL
4h 47m
ZZZero vs rasowy
Napoleon vs KameZerg
OSC
6h 47m
BSL 21
7h 47m
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
21h 47m
RSL Revival
21h 47m
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
23h 47m
WardiTV Korean Royale
23h 47m
BSL 21
1d 7h
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
1d 7h
Dewalt vs WolFix
eOnzErG vs Bonyth
Replay Cast
1d 10h
[ Show More ]
Wardi Open
1d 23h
Monday Night Weeklies
2 days
WardiTV Korean Royale
2 days
BSL: GosuLeague
3 days
The PondCast
3 days
Replay Cast
4 days
RSL Revival
4 days
BSL: GosuLeague
5 days
RSL Revival
5 days
WardiTV Korean Royale
5 days
RSL Revival
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

Proleague 2025-11-07
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 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.