.

Description
A easy-to-use PHP class for accessing official Mojang's API.
This include UUID to username conversion, get Mojang status, or fetch user's skin/head.
Installation
First you need to download the resource, and require mojang-api.class.php . Other files are not needed in your project.
So it's simple as this:
// Require API
require 'mojang-api.class.php' ;
Usage
A lot of sample code and example case are in example.php file, also be sure to check mojang-api.interface.php file to see all methods available.
// Require API
require 'mojang-api.class.php' ;
// Get UUID from username
$uuid = MojangAPI :: getUuid ( 'MTC' ) ;
echo 'UUID: <b>' . $uuid . '</b><br>' ;
// Get his name history
$history = MojangAPI :: getNameHistory ( $uuid ) ;
echo 'First username: <b>' . reset ( $history ) [ 'name' ] . '</b><br>' ;
// Print player's head
$img = '<img src="' . MojangAPI :: embedImage ( MojangAPI :: getPlayerHead ( $uuid ) ) . '" alt="Head of MTC">' ;
echo 'Skin:<br>' . $img . '<br>' ;
// Query a server
$query = MojangAPI :: query ( 'play.onecraft.fr' , 25565 ) ;
if ( $query ) echo 'There is ' . $query [ 'players' ] . ' players online out of ' . $query [ 'maxplayers' ] . '<br>' ;
else echo 'Server is offline.<br>' ;
This code will result in:

Github
Code source is fully available on Github here: https://github.com/MineTheCube/MojangAPI
Don't hesitate to report issues or send pull request if needed !
.
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta