Mojang Status
Controlla lo stato dei servizi di Mojang.

A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: personal/mojang-status.php

Line Number: 26

Backtrace:

File: /var/www/vhosts/lucapatera.it/httpdocs/application/views/projects/personal/mojang-status.php
Line: 26
Function: _error_handler

File: /var/www/vhosts/lucapatera.it/httpdocs/application/controllers/Pages.php
Line: 94
Function: view

File: /var/www/vhosts/lucapatera.it/httpdocs/index.php
Line: 315
Function: require_once

Codice PHP:
<?php
$url = "http://status.mojang.com/check";
print($url);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($ch);
curl_close($ch);
$html= json_decode($res,true);
foreach($html as $item)
{
  $nome= array_keys($item);
  $valore= array_values($item);

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