コード例 #1
0
ファイル: status.php プロジェクト: patryk0493/MinerStore
<?php

include_once 'status/status.class.php';
include_once 'config/rcon_config.php';
$status = new MinecraftServerStatus();
$response = $status->getStatus($server);
if (!$queryPort == '') {
    if (!$response) {
        echo "Serwer jest <span id='offline' style='height:20px; font-size:14px'>OFFLINE</span>";
    } else {
        $min1 = $response['players'];
        $max1 = $response['maxplayers'];
        $procenty = $min1 / $max1 * 100;
        echo "\n\t\t<div id='menubez' style='float:right; width:230px; height:auto'>\n\t\t\t\n\t\t\t<div class='st' style='width:100px; float:left'>\n\t\t\t\t<p class='link3'>Wersja: " . $response['version'] . " </p>\n\t\t\t</div>\n\t\t\t<div class='st' style='width:100px; float:right'>\n\t\t\t\t<p class='link3'>Ping: " . $response['ping'] . " </p>\n\t\t\t</div>\n\t\t\t<div class='st' style='width:220px; margin-top: 70px'>\n\t\t\t\t<p class='link3'><span id='online' style='height:20px; font-size:14px'>ONLINE</span>    Gracze: " . $response['players'] . "/" . $response['maxplayers'] . " </p>\n\t\t\t\t\n\t\t\t\t<div class='meter'>\n\t\t\t\t\t<span style='width: " . $procenty . "%'></span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t\t";
    }
}
コード例 #2
0
ファイル: index.php プロジェクト: repkam09/RITCraft-Site
                    <small>Survival Minecraft Server</small>
                </h1>

            </div>
        </div>

        <!-- Item Row -->
        <div class="row">
            <div class="col-md-4">
                <h3>Introduction</h3>
                <p>The RIT Minecraft server (also known as "RITCraft") is a semi-vanilla Minecraft server hosted by RIT students, for RIT students.
                <p>The server is hosted on a machine on the university campus (visit derezzed.student.rit.edu to see) and is intended as a place for Minecrafters across campus together.

                <h3>Server Status</h3>
                <?php 
$response = $status->getStatus('rit.j-f.co');
if (!$response) {
    echo "<strong class=\"glyphicon glyphicon-remove\">  server is offline</strong>";
} else {
    echo "<strong>rit.j-f.co is online</strong>";
    echo "</br><span>Version: " . $response['version'] . "</span>";
    echo "</br><span>Players: " . $response['players'] . " / " . $response['maxplayers'] . "</span>";
    echo "</br><span>Message: " . $response['motd'] . "</span>";
}
?>
            </div>
            <div class="col-md-4">
                <img class="img-responsive" src="./images/server.jpg" alt="">
            </div>
            <div class="col-md-4">
                <h3>How to connect</h3>
コード例 #3
0
ファイル: vanilla.php プロジェクト: pygamepi/Pi_Web
<?php

$status = new MinecraftServerStatus();
$response = $status->getStatus('www.gnosisparadox.net', '1.6.4', '25566');
$Server = "Server Status: ";
$Offline = "Offline";
$Online = "Online";
$Blue = 'blue';
$Green = 'green';
$Red = 'red';
if (!$response) {
    echo '<div class="status" style="Color:' . $Blue . '">' . $Server . '</div>';
    echo '<div class="output" style="display: inline-block; Color:' . $Red . '">' . $Offline . '</div>';
} else {
    if ($response) {
        echo '<div class="status" style="color:' . $Blue . '">' . $Server . '</div>';
        echo '<div class="output" style="display: inline-block; Color:' . $Green . '">' . $Online . '</div>';
    }
}
コード例 #4
0
ファイル: Server.php プロジェクト: CriLisCraft/StaffSite
<?php

include_once 'ServerStatus.php';
$status = new MinecraftServerStatus();
$response = $status->getStatus('104.243.39.107');
$staff = array('Chaka');
if (!$response) {
    echo '<h2>STATUS: <span class="label label-danger">Offline</span></h2>';
} else {
    echo '<h2>STATUS: <span class="label label-success">Online</span></h2>';
    echo "Online Players " . $response['players'] . "/" . $response['maxplayers'];
    echo '<table class="table"><tr><th></th><th>Username</th><th>UUID</th><th>Actions</th></tr>';
    foreach ($response['sample'] as $player) {
        echo '<tr>';
        echo '<td><img src="https://crafatar.com/avatars/' . $player->id . '?helm" alt="' . $player->name . 's head" height="16" width="16"></td>';
        echo '<td>' . $player->name . '</td><td>' . $player->id . '</td>';
        echo '<td>';
        echo '<div class="dropdown">';
        echo '<button class="btn btn-default dropdown-toggle" id="ss-dp" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">';
        echo 'Actions';
        echo '<span class="caret"></span>';
        echo '</button>';
        echo '<ul class="dropdown-menu" aria-labelledby="ss-dp">';
        echo '<li><a href="?kick="' . $player->name . '>Kick</a></li>';
        echo '<li><a href="?ban="' . $player->name . '>Ban</a></li>';
        echo '</ul>';
        echo '</div>';
        echo '</td>';
        echo '</tr>';
    }
    echo '</table>';
コード例 #5
0
<?php

include_once 'MinecraftServerStatus/status.class.php';
$status = new MinecraftServerStatus();
$response = $status->getStatus('pvp24.com');
if (!$response) {
    echo "The Server is offline!";
} else {
    echo "<img width=\"64\" height=\"64\" src=\"" . $response['favicon'] . "\" /> <br>\n\t\tThe Server " . $response['hostname'] . " is running on " . $response['version'] . " and is online,\n\t\tcurrently are " . $response['players'] . " players online\n\t\tof a maximum of " . $response['maxplayers'] . ". The motd of the server is '" . $response['motd'] . "'. \n\t\tThe server has a ping of " . $response['ping'] . " milliseconds.";
}
コード例 #6
0
<?php

require_once "status.class.php";
$status = new MinecraftServerStatus();
$ip = $_POST["address"];
if (!isset($ip)) {
    $ip = "afteremerald.us";
}
$port = $_POST["port"];
if (!isset($port)) {
    $port = 25565;
}
$response = $status->getStatus($ip, $port, '1.8.*');
if (!$response) {
    echo "Server is Offline";
} else {
    echo preg_replace("§[0-z]", "", json_encode($response));
}
コード例 #7
0
						<p>Tiešā vēstule SkyCore darbiniekiem</p>
					</header>
				</div>
				<div class="container 50%">
				<div class="monitor_block" style="background:url('http://noob.lv/template/nooblv_original/template_images/maps/minecraft/world.png')" >
					<div class="monitor_info">
						<div class="monitor_info_1 pull-left radius3_top-right radius3_bottom-right">mc.skycore.eu</div>
							<div class="monitor_players pull-left radius3_top-right radius3_bottom-right"><b>22</b> / 100</div>
							<div class="monitor_info_2 pull-left radius3_top-right radius3_bottom-right">
						</div>
					</div>
				</div>
					<?php 
include_once 'MinecraftServerStatus/status.class.php';
$status = new MinecraftServerStatus();
$response = $status->getStatus('skycore.eu', 25565, '1.8');
if (!$response) {
    echo "The Server is offline!";
} else {
    echo "<img width=\"64\" height=\"64\" src=\"" . $response['favicon'] . "\" /> <br>\n\t\t\t\t\t\t\tThe Server " . $response['hostname'] . " is running on " . $response['version'] . " and is online,\n\t\t\t\t\t\t\tcurrently are " . $response['players'] . " players online\n\t\t\t\t\t\t\tof a maximum of " . $response['maxplayers'] . ". The motd of the server is '" . $response['motd'] . "'. \n\t\t\t\t\t\t\tThe server has a ping of " . $response['ping'] . " milliseconds.";
}
if ($response['players'] > 0) {
    $players = "Serverī pieslēdzies " . $response['players'] . " spēlētājs";
} elseif ($response['players'] == 0) {
    $players = "Serveris ir tukš!";
}
echo "\n\t\t\t\t\t\t" . $players;
?>
				</div>
			</section>
			
コード例 #8
0
ファイル: index.php プロジェクト: Chris-Bitler/RITcraft-Site
                    <small>Survival Minecraft Server</small>
                </h1>

            </div>
        </div>

        <!-- Item Row -->
        <div class="row">
            <div class="col-md-4">
                <h3>Introduction</h3>
                <p>The RIT Minecraft server (also known as "RITcraft") is a semi-vanilla Minecraft server hosted by RIT students, for RIT students.
                <p>The server is hosted on a machine on the university campus (visit derezzed.student.rit.edu to see) and is intended as a place for Minecrafters across campus to come together.

                <h3>Server Status</h3>
                <?php 
$response = $status->getStatus('rit.j-f.co', 30000, 1.8 . x);
if (!$response) {
    echo "<strong class=\"glyphicon glyphicon-remove\">  Server is offline.</strong>";
} else {
    echo "<strong>rit.j-f.co is online</strong>";
    echo "</br><span><em>Version</em>: " . $response['version'] . "</span>";
    echo "</br><span><em>Players</em>: " . $response['players'] . " / " . $response['maxplayers'] . "</span>";
    echo "</br><span><em>MOTD</em>: " . $response['motd'] . "</span>";
}
?>
            </div>
            <div class="col-md-4">
                <img class="img-responsive" src="./images/server.jpg" alt="">
            </div>
            <div class="col-md-4">
                <h3>How to connect</h3>