Skip to content

Instantly share code, notes, and snippets.

@ironviking
Created July 2, 2012 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ironviking/3034265 to your computer and use it in GitHub Desktop.
Save ironviking/3034265 to your computer and use it in GitHub Desktop.
Minebook API
<?php
//Get the data
$grab = file_get_contents("http://api.minebook.me/player/ironviking/wall");
//Decode the json to a associative array
$data = json_decode($grab,true);
//How many messages to grab? (will grab 10)
$take = 10;
//While x (0) is less then take (10)
for($x = 0; $x < $take; $x++;){
//Echo it out from the array
echo $data['data'][$x]['content'];
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment