Skip to content

Instantly share code, notes, and snippets.

@enkrates
Created October 19, 2013 02:51
Show Gist options
  • Save enkrates/7051151 to your computer and use it in GitHub Desktop.
Save enkrates/7051151 to your computer and use it in GitHub Desktop.
A very simple bit of PHP to follow a coding challenge.
<?php
$url = 'http://letsrevolutionizetesting.com/challenge?id=756775492';
do {
echo "following the json\n";
$json = file_get_contents($url . '&format=json');
$data = json_decode($json);
$url = isset($data->follow) ? $data->follow : NULL;
} while ( isset($data->follow) );
var_dump($data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment