1

Minecraft verification.

nahtnam's Avatar nahtnam3/29/13 6:30 pm
1 emeralds 112 8
4/6/2013 12:52 pm
nahtnam's Avatar nahtnam
Hi, I was setting up a website for my new server, and I wanted to add minecraft username verification, kind of like enjin. I want it so that people are redirected to minecraft.net, and if they login successfully, then they will be registered to my site. Anyone know how to do that using PHP? Thanks in advance...
Posted by nahtnam's Avatar
nahtnam
Level 18 : Journeyman Modder
5

Create an account or sign in to comment.

8

1
04/06/2013 12:52 pm
Level 18 : Journeyman Modder
nahtnam
nahtnam's Avatar
Thanks SOOOOOO much for this.
1
04/05/2013 8:22 pm
Level 12 : Journeyman Crafter
Rogue
Rogue's Avatar
<form action="https://login.minecraft.net" method="post">
<div id="login_area">
Username / Email:
<input type="text" id="user" name="user" value="">
<br>
Password:
<input type="password" id="password" name="password" value="">
<input type="hidden" id="version" name="version" value="13">
</div>
<div id="login_submit">
<input type="submit" class="button" value="Log In">
</div>
</form>


When you submit this, it will return a set of strings, delimited by colons (":"). An explanation on those:
wiki1. current version of the game files (not the launcher itself). This is a unix timestamp which the launcher compares to the ~/.minecraft/bin/version file.
2. Previously contained a download ticket for requesting new versions of minecraft.jar from the server. Now contains only "deprecated".
3. case-correct username.
4. sessionId - a unique ID for your current session.
5. UID - currently unused, introduced near August 8th, 2012. Grum says this is the unique ID for the user, potentially for changing Minecraft names in future.


If you don't get that string returned, then:
wikiIf the request is missing a parameter, the server will return "Bad response". If the login information is incorrect, the server will return "Bad login". If the login information is correct but the account isn't premium, the server will return "User not premium". If your minecraft.net account has been migrated to a Mojang account but you're logging in with your minecraft.net username the server will return "Acount migrated, use e-mail".
1
04/05/2013 1:24 am
Level 18 : Journeyman Modder
nahtnam
nahtnam's Avatar
Hi, rogue thaks for the help, is there any way u can make a rough example, it would help a lot.
1
04/04/2013 7:47 pm
Level 31 : Artisan Geek
Z645
Z645's Avatar
I don't think that'll be able to work unless you get special code from Mojang. That link will only help if you're interested in manually checking if someone is premium or not
1
04/02/2013 10:20 pm
Level 31 : Artisan Geek
Z645
Z645's Avatar
I don't think you can do this because Minecraft doesn't have an open API. Would be sort of hard unless you contact Mojang yourself.
1
04/03/2013 5:05 pm
Level 18 : Journeyman Modder
nahtnam
nahtnam's Avatar
So enjin actually contacted minecraft so that they can setup verification? Also i founbd this link:
https://minecraft.net/haspaid.jsp?user={usename of player}

this basically states if user is premium. Any idea on how to scrape the true or false with php?
1
04/05/2013 1:11 am
Level 12 : Journeyman Crafter
Rogue
Rogue's Avatar
You wouldn't be able to verify they are the owner of the account though. And they probably won't want to give you the info anyhow.

Details for logging in with php: http://wiki.vg/Authentication#Login

A good lib for it: http://requests.ryanmccue.info/
1
04/02/2013 9:30 pm
Level 18 : Journeyman Modder
nahtnam
nahtnam's Avatar
Bump!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome