Хостинг серверов Minecraft playvds.com
  1. Вы находитесь в русском сообществе Bukkit. Мы - администраторы серверов Minecraft, разрабатываем собственные плагины и переводим на русский язык плагины наших собратьев из других стран.
    Скрыть объявление

Помогите Помогите найти мониторинг!

Тема в разделе "[Архив] Помощь", создана пользователем ilyad2, 20 дек 2012.

Статус темы:
Закрыта.
  1. Автор темы
    ilyad2

    ilyad2 Активный участник Пользователь

    Баллы:
    88
    Skype:
    Ilya15271
    Имя в Minecraft:
    ilyad3
    Всем привет!
    Помогите плиз найти мониторинг серверов как тут: http://server.benderchat.ru/
    P.S. кто поможет,тому лайк
     
    I-Am-Black-Overlord нравится это.
  2. Хостинг MineCraft
    <
  3. alexandrage

    alexandrage Администратор

    Баллы:
    173
    Skype:
    alexandr0116
    ilyad2 нравится это.
  4. VareZzZz

    VareZzZz Старожил Пользователь

    Баллы:
    153
    Skype:
    rockufa
    Имя в Minecraft:
    UfaRock
    Этот мониторинг делался под заказ.
    В паблике его не найти)
     
  5. alexandrage

    alexandrage Администратор

    Баллы:
    173
    Skype:
    alexandr0116
    @VareZzZz, уверен? это пабликовый моник. Просто стиль каждый сам себе делает.
     
  6. VareZzZz

    VareZzZz Старожил Пользователь

    Баллы:
    153
    Skype:
    rockufa
    Имя в Minecraft:
    UfaRock
    Уверен конечно. BenderChat проект под моим присмотром)

    Работает через Minequery
     
  7. Автор темы
    ilyad2

    ilyad2 Активный участник Пользователь

    Баллы:
    88
    Skype:
    Ilya15271
    Имя в Minecraft:
    ilyad3
    Что значит под твоим присмотром?
     
    slavik123123123 нравится это.
  8. VareZzZz

    VareZzZz Старожил Пользователь

    Баллы:
    153
    Skype:
    rockufa
    Имя в Minecraft:
    UfaRock
    http://server.benderchat.ru/team.html

    У таких проектов у меня много)

    Точно такой же мониторинг стоит на Streamcraft.net и на Uselessmine.ru
    На redcrafting.ru стоит этот же мониторинг, но полностью переписан дизайн.
     
    Сникерсни нравится это.
  9. Xssnick

    Xssnick Старожил Пользователь

    Баллы:
    103
    Что именно нужно мониторить?
     
  10. Автор темы
    ilyad2

    ilyad2 Активный участник Пользователь

    Баллы:
    88
    Skype:
    Ilya15271
    Имя в Minecraft:
    ilyad3
    Мои сервера
     
    Сникерсни и Оригинало_о нравится это.
  11. Xssnick

    Xssnick Старожил Пользователь

    Баллы:
    103
    Ну это понятно, что нужно отображать? Игроков онлайн , сообщения и тд или просто онлайн\оффлайн?
     
  12. Автор темы
    ilyad2

    ilyad2 Активный участник Пользователь

    Баллы:
    88
    Skype:
    Ilya15271
    Имя в Minecraft:
    ilyad3
    онлайн/оффлайн, кол-во слотов,онлайн игроков и всё
     
    zuma2 нравится это.
  13. Xssnick

    Xssnick Старожил Пользователь

    Баллы:
    103
    Для этого нужен плагин Minequery
    Его php функция

    Код:
    <?php
     
    /*
     
    * Minequery PHP
     
    * Copyright (C) 2011 Vex Software LLC
     
    *
     
    * This program is free software: you can redistribute it and/or modify
     
    * it under the terms of the GNU General Public License as published by
     
    * the Free Software Foundation, either version 3 of the License, or
     
    * (at your option) any later version.
     
    *
     
    * This program is distributed in the hope that it will be useful,
     
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
     
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     
    * GNU General Public License for more details.
     
    *
     
    * You should have received a copy of the GNU General Public License
     
    * along with this program. If not, see <http://www.gnu.org/licenses/>.
     
    */
     
    /**
     
    * The Minequery PHP class.
     
    */
     
    class Minequery {
     
    /**
     
    * @var string name of itself for testing
     
    */
     
    public static $classname = 'Minequery';
     
    /**
     
    * Queries a Minequery server.
     
    *
     
    * [USER=5382]Static[/USER]
     
    * @param string $address The address to the Minequery server.
     
    * @param int $port The port of the Minequery server.
     
    * @param int $timeout The time given before the connection attempt gives up.
     
    * @return array|bool An array on success, FALSE on failure.
     
    */
     
    public static function query($address, $port = 25566, $timeout = 30) {
     
    $query = array();
     
    $write = "QUERY\n";
     
    $class = self::$classname;
     
    $response = $class::read($address, $port, $errno, $errstr, $timeout, $write, $latency);
     
    if (false === $response) {
     
    return false;
     
    }
     
    $response = explode("\n", $response);
     
    // Server port
     
    $query['serverPort'] = explode(" ", $response[0], 2);
     
    $query['serverPort'] = $query['serverPort'][1];
     
    // Player count
     
    $query['playerCount'] = explode(" ", $response[1], 2);
     
    $query['playerCount'] = $query['playerCount'][1];
     
    // Max players
     
    $query['maxPlayers'] = explode(" ", $response[2], 2);
     
    $query['maxPlayers'] = $query['maxPlayers'][1];
     
    // Player list
     
    list(, $buffer) = explode(" ", $response[3], 2);
     
    $buffer = trim($buffer, "[] ");
     
    $query['playerList'] = $buffer ? explode(", ", $buffer) : array();
     
    $query['latency'] = $latency;
     
    return $query;
     
    }
     
    /**
     
    * Queries a Minequery server using JSON.
     
    *
     
    * [USER=5382]Static[/USER]
     
    * @param string $address The address to the Minequery server.
     
    * @param int $port The port of the Minequery server.
     
    * @param int $timeout The time given before the connection attempt gives up.
     
    * @return object|bool A stdClass object on success, FALSE on failure.
     
    */
     
    public static function query_json($address, $port = 25566, $timeout = 30) {
     
    $beginning_time = microtime(true);
     
    $socket = @fsockopen($address, $port, $errno, $errstr, $timeout);
     
    if (!$socket) {
     
    // Could not establish a connection to the server.
     
    return false;
     
    }
     
    $end_time = microtime(true);
     
    fwrite($socket, "QUERY_JSON\n");
     
    $response = "";
     
    while (!feof($socket)) {
     
    $response .= fgets($socket, 1024);
     
    }
     
    $query = json_decode($response);
     
    $query->latency = ($end_time - $beginning_time) * 1000;
     
    return $query;
     
    }
     
    /**
     
    * Queries a Remote Socket
     
    *
     
    * [USER=5382]Static[/USER]
     
    * @param string $address The address to the Minequery server.
     
    * @param int $port The port of the Minequery server.
     
    * @param int $errno
     
    * @param string $errstr
     
    * @param int $timeout The time given before the connection attempt gives up.
     
    * @param string $write
     
    * @param int $latency
     
    * @return string|bool An string on success, FALSE on failure.
     
    */
     
    protected static function read($address, $port, &$errno, &$errstr, $timeout, $write, &$latency) {
     
    $latency = NULL;
     
    $beginning_time = microtime(true);
     
    $socket = @fsockopen($address, $port, $errno, $errstr, $timeout);
     
    if (!$socket) {
     
    // Could not establish a connection to the server.
     
    return false;
     
    }
     
    $end_time = microtime(true);
     
    $latency = ($end_time - $beginning_time) * 1000;
     
    fwrite($socket, $write);
     
    $response = "";
     
    while (!feof($socket)) {
     
    $response .= fgets($socket, 1024);
     
    }
     
    return $response;
     
    }
     
    }

    Использование
    Код:
    require('minequery.class.php');
    print_r(Minequery::query("localhost"));
    print_r(Minequery::query_json("localhost"));
     
  14. programmeraxel

    programmeraxel Старожил

    Баллы:
    103
    Да вы гоните там пару байт по TCP передать и сервер ответит своей статой...
     
    MineMan910 и Игнорекс нравится это.
  15. Droid

    Droid Старожил Пользователь

    Баллы:
    123
    Имя в Minecraft:
    Sniperik
    Оффтоп:
    VareZzZz чисто для интереса, сколько стоят ваши услуги ?
     
  16. Автор темы
    ilyad2

    ilyad2 Активный участник Пользователь

    Баллы:
    88
    Skype:
    Ilya15271
    Имя в Minecraft:
    ilyad3
    Мне тоже очень интересно
     
    Black-UK-Lord нравится это.
  17. VareZzZz

    VareZzZz Старожил Пользователь

    Баллы:
    153
    Skype:
    rockufa
    Имя в Minecraft:
    UfaRock
    Какие именно?
     
  18. Автор темы
    ilyad2

    ilyad2 Активный участник Пользователь

    Баллы:
    88
    Skype:
    Ilya15271
    Имя в Minecraft:
    ilyad3
    ну вообщем создание сервера с сайтом и лаунчером к примеру
     
  19. alexandrage

    alexandrage Администратор

    Баллы:
    173
    Skype:
    alexandr0116
    У меня завалялся очень старый мониторинг по minequery с показом скинов игроков.
     
Статус темы:
Закрыта.

Поделиться этой страницей