Web PHP Mojang API 1.5

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

  1. then how i would do it?
  2. MTC


  3. uhh, this looks interesting! Gonna try it out. :)
    • Like Like x 1
  4. MTC


  5. Thank you very much!
    It's working now.

    - Chris
    • Friendly Friendly x 1
  6. MTC


  7. Looks really good! But is there a limit? Something like only 10 Request per minute or does it have absolutely no limits?
  8. Mojang's API is limited and can be accessed by an ip-address only one time per minute if it's the same request as like as before.
  9. MTC


    It highly depends on which method you use. For UUID/username queries, it's about 600 requests per 10 minutes. But for skins, "this has a much stricter rate limit: You can request the same profile once per minute, however you can send as many unique requests as you like."

    Quoted from: http://wiki.vg/Mojang_API
  10. It doesnt work now, or does it?
  11. It does if you know what you have to do with this source.
    I've been using this as a head "API" system for a couple of months now, which works fine.
  12. MTC


    It works flawlessly, are you facing any issue?

    Remember that you should use a cache, especially when dealing with skins or session profiles.
    • Agree Agree x 1
  13. Hey mtc,

    I just have an advice for you,

    You are using

    instead you can do

    $MjngAPI = new MojangAPI;

    and replace all


    thats easyer to read and comprehensiv for every developers.

    On that i hope you continue on your way, bye
    • Like Like x 1
  14. Hello. Who I can get the list of online players on a server? :)
  15. MTC


    It should be something like:
    Code (PHP):
    $query = MojangAPI::query('play.onecraft.fr', 25565);
    if ($query) {
    Query must be enabled on server.properties/spigot.yml.
    • Useful Useful x 1
  16. MTC