Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use xPaw\MinecraftQuery;
- // Edit this ->
- define( 'MQ_SERVER_ADDR', 'mc.pwr.lt' );
- define( 'MQ_SERVER_PORT', 25565 );
- define( 'MQ_TIMEOUT', 1 );
- // Edit this <-
- // Display everything in browser, because some people can't look in logs for errors
- Error_Reporting( E_ALL | E_STRICT );
- Ini_Set( 'display_errors', false );
- require __DIR__ . '/src/MinecraftQuery.php';
- require __DIR__ . '/src/MinecraftQueryException.php';
- $Query = new MinecraftQuery();
- $Query->Connect(MQ_SERVER_ADDR, MQ_SERVER_PORT, MQ_TIMEOUT);
- $Info = $Query->GetInfo();
- ?>
- <html>
- <head>
- <style type="text/css">
- .monitorius {
- border-radius: 6px;
- border-top-right-radius: 6px;
- border-bottom-right-radius: 6px;
- text-transform: uppercase;
- padding: 0px 15px 15px;
- width: 250px;
- position: relative;
- margin-top: 15px;
- float: center;
- line-height: 12px;
- font-size: 12px;
- color: #2288ff;
- border-bottom-right-radius: 6px;
- border-top-right-radius: 6px;
- font-family: 'Cabin', sans-serif;
- font-weight: 500;}
- .monitorius span.montekst {
- color:#bb33ff;
- line-height: 12px;
- font-size: 12px;
- font-family: 'Cabin', sans-serif;
- font-weight: 500;}
- </style>
- </head>
- <body>
- <br>
- <div class="monitorius">
- <?php
- if(isset($Info['HostName']) && $Info['HostName'] != null)
- {
- ?>
- <p>Statusas: <span><b>Veikia</b></span></p>
- <p>Serveris: <span><br><b></b></span></p>
- <p>IP: <span><b>mc.pwr.lt</span></b>
- </p>
- <p>Versija: <span><b>1.8.x - 1.15.x</span></b>
- </p>
- <p>Dabar žaidžia: <span class="montekst"></span></p>
- <?php
- }
- else
- {
- <p>Statusas: <span><b>Neveikia</b></span></p>
- }
- ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement