Any idea for get query server infos into php website?
So example:
Server Name
Online/Offline
IP, Port
Currently Players/Max Players
Map
Servers
Query Server
Query Server
1

Server Name
Online/Offline
IP, Port
Currently Players/Max Players
Map
but built in to my website...so
Apache uwu: if (strlen($v_temp)-$namelen*2-strlen($svmap)*2-4==8)
{
	$gamemode="Standard";
}
else
{
	$gamemodes=array("Deathmatch","Team Deathmatch","Construction","Zombies!");
	$gamemode=$gamemodes[intval(substr($v_temp,-4,2))-1];
}
if (strlen($v_temp)-strlen($namelen)*2-strlen($svmap)*2-4==8)
{
	$players=hexdec(substr($v_temp,-6,2));
	$maxplayers=hexdec(substr($v_temp,-4,2));
	$bots=hexdec(substr($v_temp,-2,2));
}
else
{
	if ($gamemode=="Standard")
	{
		$players=hexdec(substr($v_temp,-6,2));
		$maxplayers=hexdec(substr($v_temp,-4,2));
	}
	else
	{
		$players=hexdec(substr($v_temp,-8,2));
		$maxplayers=hexdec(substr($v_temp,-6,2));
	}
	$bots=hexdec(substr($v_temp,-2,2));
}
Ghost-Rider: You can still use the PHP script provided by
Apache uwu. It doesn't matter if the webserver is on another machine/network than the game server. PHP allows you to use UDP sockets to contact any server you want. But note that this can have a bad impact on the performance of your webserver. Many webhosters deactivate PHP sockets for that reason.$this->p->skip(2);
$this->r->add('hostname', $this->readString());
$this->r->add('password', $this->p->readInt8());
$this->r->add('mapname', $this->readString());
$this->r->add('num_players', $this->p->readInt8());
$this->r->add('max_players', $this->p->readInt8());
$this->r->add('fog_of_war', $this->p->readInt8());
$this->r->add('war_mode', $this->p->readInt8());
$this->r->add('version', $this->readString());
1
