Skip to content

Doesn't work anymore at all #9

@realmayus

Description

@realmayus

Does your API still work? Can't get it to do so.

This is my code:

<?php
    // Require API
    require 'mojangApi.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>';

?>

This is how the website looks like when it's loaded:
image

I read that warning but when I do:

if(MojangAPI::getUuid('Player')

it always returns false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions