Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header("Content-Type: text/html; charset=utf-8");
- require "jsonconnect.php";
- $console = $api->call("getLatestConsoleLogsWithLimit", array(43));
- $console = $console[0]["success"];
- //$console = array_reverse($console);
- $console = array_slice($console, 0, 100);
- $date = date("Y-m-d");
- foreach ($console as $value) {
- $console = $value["line"];
- $console = str_replace($date, '', $console);
- $msg_prefix = array("[INFO]", "[WARNING]", "[SEVERE]", "Disconnecting", "craftyoyo", "No0bak", "[m<[0;31;22m", "[m ");
- $color_prefix = array('<span style="color: #537dff;">[INFO]</span>',
- '<span style="background-color: red; color: white; font-weight: bold; ">[WARNING]</span>', '<span style="color: red;">[SEVERE]</span>',
- '<span style="color: magenta;">[Disconnecting]</span>', '<span style="color: yellow;">[craftyoyo]</span>', '<span style="color: rgb(173, 0, 255);">[No0bak]</span>','','');
- $console = str_replace($msg_prefix, $color_prefix, $console);
- echo "<div style='line-height:20px'>".$console."<br/></div>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement