Advertisement
Guest User

Untitled

a guest
Apr 4th, 2020
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.99 KB | None | 0 0
  1. <?php
  2.     use xPaw\MinecraftQuery;
  3.  
  4.     // Edit this ->
  5.     define( 'MQ_SERVER_ADDR', 'mc.pwr.lt' );
  6.     define( 'MQ_SERVER_PORT', 25565 );
  7.     define( 'MQ_TIMEOUT', 1 );
  8.     // Edit this <-
  9.  
  10.     // Display everything in browser, because some people can't look in logs for errors
  11.     Error_Reporting( E_ALL | E_STRICT );
  12.     Ini_Set( 'display_errors', false );
  13.  
  14.     require __DIR__ . '/src/MinecraftQuery.php';
  15.     require __DIR__ . '/src/MinecraftQueryException.php';
  16.  
  17.     $Query = new MinecraftQuery();
  18.    
  19.     $Query->Connect(MQ_SERVER_ADDR, MQ_SERVER_PORT, MQ_TIMEOUT);
  20.    
  21.     $Info = $Query->GetInfo();
  22.  ?>
  23. <html>
  24. <head>
  25.     <style type="text/css">
  26.     .monitorius {
  27.         border-radius: 6px;
  28.         border-top-right-radius: 6px;
  29.         border-bottom-right-radius: 6px;
  30.         text-transform: uppercase;
  31.         padding: 0px 15px 15px;
  32.         width: 250px;
  33.         position: relative;
  34.         margin-top: 15px;
  35.         float: center;
  36.         line-height: 12px;
  37.         font-size: 12px;
  38.         color: #2288ff;
  39.         border-bottom-right-radius: 6px;
  40.         border-top-right-radius: 6px;
  41.         font-family: 'Cabin', sans-serif;
  42.         font-weight: 500;}
  43.  
  44.     .monitorius span.montekst {
  45.         color:#bb33ff;
  46.         line-height: 12px;
  47.         font-size: 12px;
  48.         font-family: 'Cabin', sans-serif;
  49.         font-weight: 500;}
  50.     </style>
  51.  
  52. </head>
  53.  
  54. <body>
  55.     <br>
  56.     <div class="monitorius">
  57.    
  58.     <?php
  59.         if(isset($Info['HostName']) && $Info['HostName'] != null)
  60.         {
  61.     ?>
  62.         <p>Statusas: <span><b>Veikia</b></span></p>
  63.         <p>Serveris: <span><br><b></b></span></p>
  64.         <p>IP: <span><b>mc.pwr.lt</span></b>
  65.         </p>
  66.         <p>Versija: <span><b>1.8.x - 1.15.x</span></b>
  67.         </p>
  68.         <p>Dabar žaidžia: <span class="montekst"></span></p>
  69.     <?php
  70.         }
  71.         else
  72.         {
  73.             <p>Statusas: <span><b>Neveikia</b></span></p>
  74.         }
  75.     ?>
  76.     </div>
  77. </body>
  78.  
  79. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement