Git Product home page Git Product logo

minecraft-server-status's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

minecraft-server-status's Issues

Players are may not displayed

Script isint working. I get the following error:

Notice: Undefined offset: 1 in W:\XAMPP\htdocs\MinecraftServerStatus.class.php on line 76

Notice: Undefined offset: 1

I'm using the ip livecraft.es and it returns the information but during connection gives me the following error:

Notice: Undefined offset: 1 in /home/****/public_html/MinecraftServerStatus.class.php on line 93

Also, if I use the ip: server.minecraftgallery.com it will return the information but return an error of:

fwrite(): send of 15 bytes failed with errno=61 Connection refused
Location: MinecraftServerStatus.class.php on line 136
which if i use "error_reporting(0);" turns into "Failed to write on socket"

Thanks!

Parse error: syntax error, unexpected '[' in /home/u337092315/public_html/MinecraftServerStatus.class.php on line 23

I was attempting to use the server status file when I noticed that everywhere I included the file, this error message followed during testing:

Parse error: syntax error, unexpected '[' in /home/u337092315/public_html/MinecraftServerStatus.class.php on line 23

Is this an error on my part? I have been studying the code I have written for days, to no avail. The server I am using currently supports Php 5. Could php versions be a problem (if the script was written in an older version of php)?

Online assertion

$this->Socket = @stream_socket_client('udp://'.$Host.':'.(int)$Port, $ErrNo, $ErrStr, $Timeout);
if($ErrNo || $this->Socket === false)
$this->Info['online'] = false; return;

This is not a complete check to determine if a server is offline. In many circumstances the socket will successfully open regardless of what services are using the port.

The online Info is set to true without any useful checking at the end of this function:
$this->Info['online'] = true;

Should default to false until proven by returned data. e.g. at least one other Info value set.

Getting error at line 23 and foreach loop for players

Looks like a bad way of making an array.

error is saying that '[' is not right. I changed to $Info = array(); instead. Works great.

Also, the foreach loop for getting player list is not working correctly. I get...

Warning: Invalid argument supplied for foreach()...

on that line.

Bug in Zeile12

Ich hab nen Bugg in Zeile 12 :
Parse error: syntax error, unexpected '[' in /var/customers/webs/ni310218_2/MinecraftServerStatus.class.php on line 12

Vom MinecraftServerStatusSimple

'Failed to write on socket' - Minecraft Status Checker

I'm getting this error when trying to use it:

Fatal error: Uncaught exception 'Exception' with message 'Failed to write on socket' in /home/****/****/lib/MinecraftServerStatus.class.php:137 Stack trace: #0 /home/****/****/lib/MinecraftServerStatus.class.php(52): MinecraftServerStatus->Send(9) #1 /home/****/****/index.php(6): MinecraftServerStatus->__construct('mc.****.com') #2 {main} thrown in /home/****/****/lib/MinecraftServerStatus.class.php on line 137

Throwing exceptions

So far the code is working excellently except for testing purposes I intentionally specified either the wrong port, or shut down my server and instead of $Server->Get('online'); returning false, it throws a "Failed to write on socket" exception. I ended up changing those lines to return false vs throwing an exception. Any ideas?

the value of online appears to always be 1 when using query

i'm looping through an array of servers to check the status of each and then i build a page. when a server is online the object contains all of the fields the server offers.

when a server is offline the object still contains an empty field with the value NULL, a software field with the value "Vanilla", and an online field with a value of int(1). regardless of the server status when using query it appears the server is always online == 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.