Teh Mine

From: JonCooper 4 Aug 2011 20:52
To: ANT_THOMAS 2820 of 3934
he is such a clever dude :)
From: ANT_THOMAS 4 Aug 2011 20:52
To: JonCooper 2821 of 3934
Good stuff. I wasn't sure if PHP could link to a local IP.
From: Mouse 4 Aug 2011 20:54
To: ALL2822 of 3934
Hard Work has made me the most amazing entrance system to my soon to be built scuplture gallery from the painting gallery. I will soon me accepting commissions for sculptures (modestly sized only) .
From: Radio 4 Aug 2011 20:56
To: ALL2823 of 3934
Where's this mini site then?
From: ANT_THOMAS 4 Aug 2011 21:00
To: Radio 2824 of 3934

It's on the first post of the thread (I try to keep post 1 updated)

 

http://mine.tehforum.co.uk/site/

From: Matt 4 Aug 2011 21:32
To: Drew (X3N0PH0N) 2825 of 3934
Seeing as you asked so nicely.

php code:
 
<?php echo nl2br(htmlentities(`tail -n 30 server.log | grep '\[INFO\] <' | cut -b 28-`));


Also, Andy?! Did you just wake from a coma?
From: Chris (CHRISSS) 4 Aug 2011 21:34
To: ANT_THOMAS 2826 of 3934
Would that not just be the number of lines the client shows, so not a server thing? I'm not that bothered if it's not an easy fix. Would be nice in the browser for the text to show for longer though, and be able to bring up recent messages like bringing up the chat windows in game.
EDITED: 4 Aug 2011 21:34 by CHRISSS
From: Drew (X3N0PH0N) 4 Aug 2011 21:34
To: Matt 2827 of 3934
Andy Caer.

And thanks :D
From: ANT_THOMAS 4 Aug 2011 21:56
To: Drew (X3N0PH0N) 2828 of 3934

How do I reverse the output so the newest is at the top?

 

I've tried "array_reverse" in various places with no luck yet.

From: Drew (X3N0PH0N) 4 Aug 2011 22:00
To: ANT_THOMAS 2829 of 3934
$things = array_reverse(file('server.log'));

Should do it?
From: ANT_THOMAS 4 Aug 2011 22:01
To: Drew (X3N0PH0N) 2830 of 3934

I've sorted it anyway

 

There was once place I hadn't tried :)

From: Matt 4 Aug 2011 22:02
To: Drew (X3N0PH0N) 2831 of 3934
But, but! Caer is Caer, and he'd probably write it in Ruby or something.

To be fair, Andy would probably right it in ActionScript.
From: Drew (X3N0PH0N) 4 Aug 2011 22:11
To: Matt 2832 of 3934
Right it!

But aye, you're write.
From: ANT_THOMAS 4 Aug 2011 22:12
To: ALL2833 of 3934
Only problem being we don't get the DynMap webchat
From: ANT_THOMAS 4 Aug 2011 22:12
To: ANT_THOMAS 2834 of 3934
But I might be able to fix that myself.
From: ANT_THOMAS 4 Aug 2011 22:25
To: ANT_THOMAS 2835 of 3934
Or maybe not :((
From: koswix 4 Aug 2011 22:32
To: ANT_THOMAS 2836 of 3934
aren't the dynmap chat lines written to the log?
From: ANT_THOMAS 4 Aug 2011 22:42
To: koswix 2837 of 3934
Aye, just the way we're stripping the chat out means the DynMap ones get missed. They're formatted differently.
From: Drew (X3N0PH0N) 4 Aug 2011 23:00
To: ANT_THOMAS 2838 of 3934
How're they formatted?
From: Peter (BOUGHTONP) 4 Aug 2011 23:00
To: ANT_THOMAS 2839 of 3934
Why on earth would you want the newest at the top!? :/