Web PHP Mojang API 1.5

A easy-to-use PHP class for accessing official Mojang's API

  1. MTC

    MTC

    [​IMG]


    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.


    Download & more infos
    Get the resource here!
     
    #1 MTC, May 22, 2016
    Last edited: Sep 23, 2016
  2. How does this work, I just put the 2 files on my website and use the php examples to use the api?
     
  3. MTC

    MTC

    You only need mojang-api.class.php in your website, then require it in your script to use its methods.

    Example:
    Code (PHP):
    // 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;
     
  4. Okay, I will try this out. Thanks!
     
    • Like Like x 1
  5. AMAZING
    there is a way to check login?
     
  6. LOL MSG LEECHER
    that is no plugin
     
  7. MTC

    MTC

    What do you mean by login exactly ?
    Well this API can be used to interact with Mojang servers, not yours ;)
     
  8. i mean like
    if i can use in my website something like that:
    login: name
    pass: pass
    then its check if this account real
     
  9. MTC

    MTC

    Oh I see, I'm currently doing it, but Mojang server seems to deny all logins after a few fails..
     
  10. :( it would be really cool
     
  11. MTC

    MTC

  12. MTC

    MTC

    Here it is !
     
  13. YEYE
     
  14. maybe i know how u can bypass it
    u can try to login each time from another ip(proxy)
     
  15. MTC

    MTC

    Yeah it should work !
    I created a gist for you, so you can use a proxy to authenticate ;)
     
  16. what i need to put in the proxy :p
     
  17. MTC

    MTC

    IP of a proxy such as "75.10.230.154:80".
    You can find a list here: http://proxylist.hidemyass.com/ ;)
     
  18. there is a way to be always another ip from this list :p?
     
  19. MTC

    MTC

    Well you have to write yourself in a text file, or find another website that provide a list of proxy with IP:port