Skip to content

Instantly share code, notes, and snippets.

@dgmike
Created May 31, 2010 12:49
Show Gist options
  • Select an option

  • Save dgmike/419807 to your computer and use it in GitHub Desktop.

Select an option

Save dgmike/419807 to your computer and use it in GitHub Desktop.
<?php
$perfil = 'dgmike';
$saida = file_get_contents("http://util.dgmike.com.br/meadiciona/{$perfil}.json");
$perfil = json_decode($saida);
if ($perfil->r) {
echo '<h2>'.$perfil->data->nome.'</h2>';
foreach ($perfil->data->servicos as $servico) {
if (!$servico->url) continue; // Se não tiver a url, não irei exibir
echo "<a href='{$servico->url}' style='float:left; width: 190px; height:35;text-align:center'>";
echo "<img src='{$servico->img}' title='{$servico->title}' height='32' />";
echo "</a>";
}
echo '<br style="clear:both;" /><small>Powered by <a href="http://meadiciona.com/dgmike">meadiciona.com</a></small>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment