<?php
$infos = file_get_content('https://minecraft-api.com/api/ping/{ip}/{port}');
$json = file_get_content('https://minecraft-api.com/api/ping/{ip}/{port}/json');
echo $infos;
echo $json;
?>
Plain text:
Array([version] => Array ([name] => BungeeCord 1.8.x-1.15.x [protocol] => 578) [players] => Array ([max] => 500 [online] => 250) [description] => Array (MOTD...) [favicon] => data/image ... [modinfo] => Array ([type] => FML [modList] => Array()));
JSON:
{"version": "1.16", "name": "BungeeCord 1.8.x-1.15.x" ...}
<?php
$ping = file_get_content('https://minecraft-api.com/api/ping/status/{ip}/{port}');
$json = file_get_content('https://minecraft-api.com/api/ping/status/{ip}/{port}/json');
echo $ping;
echo $json;
?>
Plain text:
En ligne
JSON:
{"status": "En ligne"}
<?php
$online = file_get_content('https://minecraft-api.com/api/ping/online/{ip}/{port}');
$json = file_get_content('https://minecraft-api.com/api/ping/online/{ip}/{port}/json');
echo $online;
echo $json;
?>
Plain text:
250
JSON:
{"online": "250"}
<?php
$maxplayers = file_get_content('https://minecraft-api.com/api/ping/maxplayers/{ip}/{port}');
$json = file_get_content('https://minecraft-api.com/api/ping/maxplayers/{ip}/{port}/json');
echo $maxplayers;
echo $json;
?>
Plain text:
500
JSON:
{"maxplayers": "500"}
<?php
$motd = file_get_content('https://minecraft-api.com/api/ping/motd/{ip}/{port}');
$json = file_get_content('https://minecraft-api.com/api/ping/motd/{ip}/{port}/json');
echo $motd;
echo $json;
?>
Plain text:
Asylyus [BETA] Multi-Jeux [1.15.2]
JSON:
{"motd": "&a&lAsylyus - 1.15"}
<?php
$response = file_get_content('https://minecraft-api.com/api/ping/response/{ip}/{port}');
$json = file_get_content('https://minecraft-api.com/api/ping/response/{ip}/{port}/json');
echo $response;
echo $json;
?>
Plain text:
25
JSON:
{"response": "25"}
<?php
$favicon = file_get_content('https://minecraft-api.com/api/ping/favicon/{ip}/{port}');
$json = file_get_content('https://minecraft-api.com/api/ping/favicon/{ip}/{port}/json');
echo $favicon;
echo $json;
?>
Image:
JSON:
{"favicon": "base64..."}
<?php
$version = file_get_content('https://minecraft-api.com/api/ping/version/{ip}/{port}');
$json = file_get_content('https://minecraft-api.com/api/ping/version/{ip}/{port}/json');
echo $version;
echo $json;
?>
Plain text:
BungeeCord 1.8.x-1.15.x
JSON:
{"version": "BungeeCord 1.8.x-1.15.x"}