Skip to content

Instantly share code, notes, and snippets.

@AlexSJ
Last active August 29, 2015 14:02
Show Gist options
  • Save AlexSJ/0f246ae09c92c94ef61a to your computer and use it in GitHub Desktop.
Save AlexSJ/0f246ae09c92c94ef61a to your computer and use it in GitHub Desktop.
Jogos da Copa do Mundo FIFA em 6 linhas - PHP (Baseado no script Python 3 do https://gist.github.com/fmasanori/1288160dad16cc473a53)
<?php
foreach(json_decode(file_get_contents("http://worldcup.sfg.io/matches")) as $jogo) {
if ($jogo->status == 'completed') {
echo $jogo->home_team->country . '(' . $jogo->home_team->goals . ') x (' . $jogo->away_team->goals . ')' . $jogo->away_team->country . '<br>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment