This repository has been archived on 2020-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
webapi/acapi/mcuuid.php
2020-08-21 23:23:43 +02:00

15 lines
422 B
PHP

<?php
$curl_h = curl_init('https://api.minetools.eu/uuid/' . $_GET["id"]);
curl_setopt($curl_h, CURLOPT_RETURNTRANSFER, true);
$json = json_decode(curl_exec($curl_h));
$obj = new stdClass();
if ($json->{'status'} == "OK") {
$obj->status = 200;
$obj->uuid = $json->{'id'};
$obj->name = $json->{'name'};
} else {
$obj->status = 404;
}
echo json_encode($obj);