Mojang Status
Controlla lo stato dei servizi di Mojang.

A PHP Error was encountered

Severity: Warning

Message: foreach() argument must be of type array|object, null given

Filename: personal/mojang-status.php

Line Number: 26


File: /home/lucapatera/web/
Line: 26
Function: _error_handler

File: /home/lucapatera/web/
Line: 94
Function: view

File: /home/lucapatera/web/
Line: 315
Function: require_once

Codice PHP:
$url = "";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($ch);
$html= json_decode($res,true);
foreach($html as $item)
  $nome= array_keys($item);
  $valore= array_values($item);

  echo $nome[0]." > ".$valore[0]."<br>";