1. Go to this page and download the library: Download sven/minecraft-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$minecraft = new Sven\Minecraft\Minecraft;
// Build up the user object from a given username.
$minecraft->fromName($username);
// Supply an optional UNIX timestamp to get the user object of the player who
// owned that username at the time.
$minecraft->fromName($username, time() - (365 * 24 * 60 * 60));
// Build up the user object from a given UUID.
$minecraft->fromUuid($uuid);