- file_get_contents: documentation ( source)
- json_decode: documentation ( source)
<?php
//Get Player UUID from name
$name = 'john';
$uuid = "Error obtaining uuid";
$json = file_get_contents('https://api.mojang.com/users/profiles/minecraft/' . $name);
$obj = json_decode($json);
$uuid = $obj->id;
print $uuid;
?>