SkinsRestorer / SkinSystem

The Minecraft SkinSystem for SkinsRestorer
MIT License
131 stars 47 forks source link

Mojang Status #126

Closed dadowl closed 2 years ago

dadowl commented 2 years ago

Hey! Noticed such an error. The printErrorAndDie() method has a check to see if https://status.mojang.com/check is working. But on October 8, 2021, the service was closed (https://wiki.vg/Mojang_API#API_Status_.28Removed.29). I had to spend about 2 hours to figure out why nothing happens after an incorrect authorization, server resources begin to be consumed and, as a result, the request returns a 504 error, but it turned out that's the point. It seems to me that this check should be removed, or replaced with another similar API for new versions of SkinSystem.

PunchlY commented 2 years ago

Annotation off?? can

PunchlY commented 2 years ago
  function curl($url){
    if (preg_match('/^https?:\/\//', $url)) {
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_USERAGENT, 'The SkinSystem');
      $response = curl_exec($ch);
      curl_close($ch);
      if($response === false){
        //printErrorAndDie(str_replace("%err%", curl_error($ch), L::gnrl_crlerr));
        <<<<< this
      }
      return($response);
    } else {
      return(file_get_contents($url));
    }
  }
Shark-vil commented 2 years ago

https://github.com/SkinsRestorer/SkinSystem/pull/120

I'm still waiting for the pull request to be accepted.

AlexProgrammerDE commented 2 years ago

https://github.com/SkinsRestorer/SkinSystem/commit/20f0a067e7f8c94b6438e9ff95f199795d59469d