login.minecraft.net doesn't exist?

Discussion in 'Plugin Development' started by acecheesecr14, Apr 30, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    acecheesecr14

    So if I visit login.minecraft.net
    It doesn't exist... Can anyone update me?
    Code:
    ping: unknown host login.minecraft.net
    
     
  2. Offline

    Arcticmike

    it's minecraft.net/login
     
  3. Offline

    acecheesecr14

  4. Offline

    tackleza

    Look like you have to used post method not get method

    This is MCAuth. But too bad it's in PHP not java

    Maybe you can learn from this: https://github.com/mattiabasone/MCAuth
    or you can put this on your webserver(if u have) and let Java get data from http

    Code:java
    1. public static String getHTTP(String urlToRead) {
    2. URL url;
    3. String line;
    4. StringBuffer result = new StringBuffer();
    5. try {
    6. url = new URL(urlToRead);
    7. conn = (HttpURLConnection) url.openConnection();
    8. conn.setRequestMethod("GET");
    9. rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    10. while ((line = rd.readLine()) != null) {
    11. result.append(line);
    12. }
    13. rd.close();
    14. } catch (IOException e) {
    15. e.printStackTrace();
    16. } catch (Exception e) {
    17. e.printStackTrace();
    18. }
    19. return result.toString();
    20. }


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
    1Rogue likes this.
Thread Status:
Not open for further replies.

Share This Page